更新时间:2023-11-29 GMT+08:00
分享

查询端点列表

功能介绍

获取所有的端点详情。 如果不携带任何检索参数,将返回该租户的所有端点信息和系统中所有的共享端点。 如果同时指定is_shared=true和其他参数,同样还会对name、type进行过滤。

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

GET /v2/{project_id}/routemgr/endpoints

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID

表2 Query参数

参数

是否必选

参数类型

描述

name

String

端点名称

type

String

端点类型 枚举值:

  • dis

  • servicebus

  • apigw

is_shared

String

端点是否共享

limit

Integer

查询返回记录的数量限制

offset

Integer

偏移量,表示查询该偏移量后面的记录

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

Content-Type

String

消息体的类型(格式),默认取值为“application/json”

X-Auth-Token

String

用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

ief-instance-id

String

铂金版实例ID,专业版实例为空值

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

endpoints

Array of EndpointObjResp objects

端点详情

count

Long

满足条件的端点个数

表5 EndpointObjResp

参数

参数类型

描述

created_at

String

创建时间

description

String

端点描述,最大长度255,不允许^~#$%&*<>()[]{}'"\

id

String

端点ID

ief_instance_id

String

铂金版实例ID,如果为空则表示是专业版实例。

is_shared

Boolean

是否共享

name

String

端点名称,只允许中文字符、英文字符、数字、下划线、中划线,最大长度64 同一个账号中创建的端点名唯一

project_id

String

项目ID

properties

Map<String,Object>

端点的属性,端点需要对外展示的属性,示例:

  • dis: {"domain_id":"user's domain id"}

  • servicebus: {"service_port":8080}

  • apigw: {"domain_id":"user's domain id"}

type

String

端点类型。枚举值:

  • dis

  • servicebus

  • apigw

updated_at

String

更新时间

状态码: 401

表6 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述信息

状态码: 500

表7 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述信息

请求示例

响应示例

状态码: 200

查询成功

{
  "endpoints" : [ {
    "name" : "SystemREST",
    "description" : "",
    "type" : "rest",
    "properties" : {
      "public" : "stargate-elb.ief-system.svc.cluster.local"
    },
    "ief_instance_id" : "38898a99-d67c-41f8-a8cb-8c53d6d297ba",
    "is_shared" : true,
    "id" : "94150bf3-457e-4c93-8cd1-7cd3b203634b",
    "project_id" : "ed202955e111444e8ced21a1bd75fc59",
    "created_at" : "2022-04-29T18:27:28.048855+08:00",
    "updated_at" : "2022-04-29T18:27:28.048855+08:00"
  }, {
    "name" : "SystemEventBus",
    "description" : "",
    "type" : "eventbus",
    "properties" : { },
    "ief_instance_id" : "default",
    "is_shared" : true,
    "id" : "383b985e-402b-4ed0-924c-911a787ff9b7",
    "project_id" : "op_svc_ief_container1",
    "created_at" : "2021-05-12T20:39:34.553763+08:00",
    "updated_at" : "2022-09-02T17:11:55.792879+08:00"
  } ]
}

状态码

状态码

描述

200

查询成功

401

错误响应

500

错误响应

错误码

请参见错误码

分享:

    相关文档

    相关产品