文档首页/ 企业主机安全 HSS/ API参考/ API说明/ 容器管理/ 查询容器Kubernetes端点详情 - ShowKubernetesEndpointInfo
更新时间:2025-10-31 GMT+08:00
分享

查询容器Kubernetes端点详情 - ShowKubernetesEndpointInfo

功能介绍

查询容器Kubernetes端点详情

授权信息

账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限。

  • 如果使用角色与策略授权,具体权限要求请参见权限和授权项
  • 如果使用身份策略授权,当前API调用无需身份策略权限。

URI

GET /v5/{project_id}/kubernetes/endpoint/detail

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

参数解释:

项目ID,用于明确项目归属,配置后可通过该ID查询项目下资产。获取方式请参见获取项目ID

约束限制:

不涉及

取值范围:

字符长度1-256位

默认取值:

不涉及

表2 Query参数

参数

是否必选

参数类型

描述

enterprise_project_id

String

参数解释:

企业项目ID,用于过滤不同企业项目下的资产。获取方式请参见获取企业项目ID

如需查询所有企业项目下的资产请传参“all_granted_eps”。

约束限制:

开通企业项目功能后才需要配置企业项目ID参数。

取值范围:

字符长度1-256位

默认取值:

0,表示默认企业项目(default)。

id

String

端点id

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

参数解释:

用户Token,包含了用户的身份、权限等信息,在调用API接口时,可通过Token进行身份认证。获取方式请参见获取用户Token

约束限制:

不涉及

取值范围:

字符长度1-32768位

默认取值:

不涉及

响应参数

状态码:200

表4 响应Body参数

参数

参数类型

描述

id

String

id

name

String

端点名称

service_name

String

服务名称

namespace

String

命名空间

creation_timestamp

Long

创建时间戳

cluster_name

String

集群名称

labels

String

标签

association_service

Boolean

是否关联服务

endpoint_pod_list

Array of KubernetesEndpointPodInfo objects

端点关联Pod映射

endpoint_port_list

Array of KubernetesEndpointPortInfo objects

端点关联端口列表

表5 KubernetesEndpointPodInfo

参数

参数类型

描述

id

String

ID

endpoint_id

String

关联端点ID

pod_ip

String

pod IP

pod_name

String

Pod名称

available

Boolean

是否可用

表6 KubernetesEndpointPortInfo

参数

参数类型

描述

id

String

ID

endpoint_id

String

关联端点ID

name

String

端口名

protocol

String

服务协议

port

Integer

端口号

app_protocol

String

应用协议

请求示例

查询容器Kubernetes端点详情

GET  https://{endpoint}/v5/{project_id}/kubernetes/endpoint/detail?id=03eeade9-xxxx-xxxx-xxxx-fdf896b4aeb8&enterprise_project_id=all_granted_eps

响应示例

状态码:200

请求已成功

{
  "id" : "03eeade9-xxxx-xxxx-xxxx-fdf896b4aeb8",
  "name" : "proxy-exporter",
  "service_name" : "proxy-exporter",
  "namespace" : "kube-system",
  "creation_timestamp" : 1720686822000,
  "cluster_name" : "glz-2480",
  "labels" : "{\"app\":\"proxy-exporter\",\"proxy-exporter\":\"metrics\",\"version\":\"v1\"}",
  "association_service" : true,
  "endpoint_pod_list" : [ ],
  "endpoint_port_list" : [ {
    "endpoint_id" : "03eeade9-xxxx-xxxx-xxxx-fdf896b4aeb8",
    "name" : "https",
    "protocol" : "TCP",
    "port" : 10451
  } ]
}

状态码

状态码

描述

200

请求已成功

错误码

请参见错误码

相关文档