分页查询指定多级管理机构上报的主机资产,支持按主机、IP、在线状态、防护状态和平台筛选;机构 ID 可从机构列表获取。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
|---|---|---|---|---|
Action | String | 是 | ListMultiLevelAssetHosts | 要执行的操作,取值:ListMultiLevelAssetHosts。 |
Version | String | 是 | 2024-05-08 | API的版本,取值:2024-05-08。 |
AccountID | String | 否 | account-id-001 | 租户ID |
Conditions | Object | 否 | -- | 主机信息筛选条件;IdList 和 Conditions 均不传时不限制主机范围 |
IdList | Array of String | 否 | ["agent-id-001","agent-id-002"] | 指定主机 ID 列表,可通过 ListHostsAgentIDs 接口获取;不传时按 Conditions 筛选 |
InstitutionID | String | 否 | institution-id-001 | 机构ID |
PageNumber | Long | 是 | 1 | 翻页页码,取值范围为 1 及以上 |
PageSize | Long | 是 | 20 | 每页记录数,取值范围为 1~5000 |
SortBy | String | 否 | LastHeartbeatTime | 排序字段;不传时使用接口默认排序 |
SortOrder | String | 否 | Desc | 排序顺序
|
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
TotalCount | Long | 1 | 全部数据条数 |
PageNumber | Long | 1 | 当前页面 |
PageSize | Long | 20 | 页面大小 |
Data | Array of Object | -- | 分页业务数据,具体元素结构见各接口响应声明 |
POST /?Action=ListMultiLevelAssetHosts&Version=2024-05-08 HTTP/1.1 Host: seccenter.volcengineapi.com Content-Type: application/json; charset=UTF-8 X-Date: 20241120T080538Z X-Content-Sha256: 287e874e******d653b44d21e Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20241120/cn-beijing/seccenter/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f { "AccountID": "account-id-001", "Conditions": { "AgentID": "agent-id-001", "AgentIDList": [ "agent-id-001", "agent-id-002" ], "AgentStatus": [ "online" ], "AllHost": false, "CloudProviders": [ "volcengine" ], "Hostname": "web-server-001", "Ip": "192.0.2.10", "LeafGroupIDs": [ "group-id-101", "group-id-102" ], "Os": "linux", "Platforms": [ "Linux" ], "ProxyName": "proxy-001", "ProxyServerName": "proxy-server-001", "Regions": [ "cn-beijing" ], "Risk": { "Alarm": true, "Baseline": false, "IsRealRiskVul": false, "Virus": false, "Vuln": true }, "SecurityEnhancement": true, "Status": [ "Protecting" ], "Tags": [ "production", "web" ], "TopGroupID": "group-id-001", "VirusFileAutoIsolate": false, "Visibility": [ "private" ], "VpcIds": [ "vpc-001" ] }, "IdList": [ "agent-id-001", "agent-id-002" ], "InstitutionID": "institution-id-001", "PageNumber": 1, "PageSize": 20, "SortBy": "LastHeartbeatTime", "SortOrder": "Desc" }
{ "ResponseMetadata": { "RequestId": "20241120165538010234567890", "Action": "ListMultiLevelAssetHosts", "Version": "2024-05-08", "Service": "seccenter", "Region": "cn-beijing" }, "Result": { "Data": [ { "AbnormalPluginsList": "collector: offline", "AccountID": "account-id-001", "AgentID": "agent-id-001", "AgentStatus": "not_installed", "ClientPublicIP": "192.0.2.10", "CloudProvider": "volcengine", "CpuUsage": 0.95, "Dns": "DNS", "EcsInstance": { "AccessKey": "AKLTEXAMPLE001", "AccountID": "account-id-001", "Cpu": 1, "CreatedAt": "2024-05-08T10:00:00Z", "ECSUpdateAt": "2024-05-08T10:00:00Z", "EipAddress": "192.0.2.10", "HostName": "host-001", "IPList": [ "192.0.2.10" ], "InstanceName": "example-name", "Mem": 1, "OsName": "veLinux 1.0 64位", "OsType": "veLinux", "Platform": "Linux", "PlatformVersion": "1.0", "PrimaryIpAddress": "192.0.2.10", "Region": "cn-beijing", "SecurityEnhancementStrategy": "security-enhancement-strategy-sample", "Status": "RUNNING", "Visibility": "visibility-sample", "VpcId": "vpc-id-001", "VpcName": "example-name", "ZoneId": "cn-beijing-a" }, "FirstHeartbeatTime": 1786533780, "Gateway": "192.0.2.1", "Group": "default-group", "GroupPath": "/group1/group2", "GroupPathEn": "/group1/group2", "InstitutionID": "institution-id-001", "KernelVersion": "1.0.0", "LastHeartbeatTime": 1786533780, "MemUsage": 0.95, "OldValidCode": 1, "Online": true, "Platform": "linux", "PlatformVersion": "linux", "PluginsBriefInfo": "collector 1.0.0 online", "PluginsStatus": "all_online", "Reason": "example description", "Risk": { "Alarm": 1, "Baseline": 1, "Virus": 1, "Vuln": 1 }, "SecurityEnhancement": true, "StartTime": 1786533780, "State": "success", "StateDetail": "success", "Status": "Protecting", "Tags": [ "production" ], "TotalMem": 8589934592, "UpdateTime": 1786579199, "UserStatus": "start_succeed", "UserStatusReason": "success", "UserStatusReasonCode": 0 } ], "PageNumber": 1, "PageSize": 20, "TotalCount": 1 } }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 说明 |
|---|---|---|
400 | MissingParameter | 请求参数缺失,请检查参数是否已正确传入。 |
400 | InvalidParameter | 请求参数错误,请检查参数传递内容是否正确。 |
400 | OperationDenied | 不允许的操作,请检查当前资源是否被占用。 |
500 | InternalError | 服务器内部错误,请稍后重试或联系技术支持。 |
500 | DBOperateError | 数据库操作异常,请稍后重试或联系技术支持。 |