更新时间:2023-06-28 GMT+08:00
分享

查询终端节点列表

功能介绍

该接口可以用于查询终端节点列表。终端节点用来提供服务访问入口。

该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见:地区和终端节点

调试

您可以在API Explorer中调试该接口。

URI

GET /v3/endpoints

表1 Query参数

参数

是否必选

参数类型

描述

interface

String

终端节点平面。

service_id

String

服务ID。

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

Content-Type

String

该字段内容填为“application/json;charset=utf8”。

X-Auth-Token

String

IAM用户的token(无需特殊权限)。

响应参数

表3 响应Body参数

参数

参数类型

描述

endpoints

Array of objects

资源链接地址。

links

Object

终端节点信息列表。

表4 endpoints

参数

参数类型

描述

service_id

String

终端节点所属服务的ID。

region_id

String

终端节点所属区域的ID。

links

Object

终端节点的资源链接信息。

id

String

终端节点ID。

interface

String

终端节点平面。

region

String

终端节点所属区域。

url

String

终端节点的地址。

enabled

Boolean

终端节点是否可用。

请求示例

查询终端节点列表。

GET https://iam.myhuaweicloud.com/v3/endpoints

响应示例

状态码为 200 时:

请求成功。

{
    "endpoints": [
        {
            "service_id": "3e93d3eb20b34bfbbdcc81a79c1c3045",
            "region_id": "cn-north-1",
            "links": {
                "next": null,
                "previous": null,
                "self": "https://iam.myhuaweicloud.com/v3/endpoints/0046cca357c94165b7a10ec2c01bdf60"
            },
            "id": "0046cca357c94165b7a10ec2c01bdf60",
            "interface": "public",
            "region": "cn-north-1",
            "url": "https://ims.sample.domain.com",
            "enabled": true
        },
        {
            "service_id": "5186586acd38461d84b3dbf9f02e33ae",
            "region_id": "cn-north-1",
            "links": {
                "next": null,
                "previous": null,
                "self": "https://iam.myhuaweicloud.com/v3/endpoints/00d546d4823e452491407284ab26612c"
            },
            "id": "00d546d4823e452491407284ab26612c",
            "interface": "public",
            "region": "cn-north-1",
            "url": "https://ges.sample.domain.com/v1.0/$(tenant_id)s",
            "enabled": true
        }
    ],
    "links": {
        "next": null,
        "previous": null,
        "self": "https://iam.myhuaweicloud.com/v3/endpoints"
    }
}

返回值

返回值

描述

200

请求成功。

400

参数无效。

401

认证失败。

403

没有操作权限。

404

未找到相应的资源。

405

不允许的方法。

413

请求体过大。

501

接口没有实现。

503

服务不可用。

错误码

分享:

    相关文档

    相关产品