更新时间:2025-09-23 GMT+08:00

资产指纹-端口-服务器列表

功能介绍

具备该端口的主机/容器信息

URI

GET /v5/{project_id}/asset/ports/detail

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID

表2 Query参数

参数

是否必选

参数类型

描述

enterprise_project_id

String

企业项目

host_name

String

主机名称

host_ip

String

主机ip

port

Integer

端口号

type

String

端口类型

category

String

类别,默认为host,包含如下:

  • host:主机

  • container:容器

limit

Integer

默认10

offset

Integer

默认是0

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

x-auth-token

String

iam token

响应参数

状态码:200

表4 响应Body参数

参数

参数类型

描述

total_num

Integer

机器总数

data_list

Array of PortHostResponseInfo objects

机器信息列表

表5 PortHostResponseInfo

参数

参数类型

描述

container_id

String

镜像id

host_id

String

主机id

host_ip

String

主机ip

host_name

String

主机名称

laddr

String

监听ip

path

String

程序文件路径

pid

Integer

pid

port

Integer

端口

status

String

状态

type

String

类型

container_name

String

容器名称

agent_id

String

agent id

请求示例

默认查询前10条端口为22的主机列表

GET https://{endpoint}/v5/{project_id}/asset/ports/detail?port=22

响应示例

状态码:200

具备该端口的主机信息

{
  "total_num" : 1,
  "data_list" : [ {
    "host_id" : "03117200-xxxx-xxxx-xxxx-a89a10e66dbe",
    "host_ip" : "192.168.0.1",
    "host_name" : "ecs-eule",
    "laddr" : "0.0.0.0",
    "path" : "C:\\Windows\\system32\\svchost.exe",
    "process_path" : "/CloudResetPwdUpdateAgent/bin/wrapper",
    "port" : 888,
    "status" : "unknow",
    "type" : "UDP",
    "container_id" : "ce794b8a6-xxxx-xxxx-xxxxx-36bedf2c7a4f6083fb82e5bbc82709b50018",
    "container_name" : "hss_imagescan_W73V1WO6",
    "agent_id" : "03jjj-xxxx-xxxx-wwwsedf"
  } ]
}

状态码

状态码

描述

200

具备该端口的主机信息

错误码

请参见错误码