获取主机基本信息列表
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListHostsBasicInfos | 要执行的操作,取值:ListHostsBasicInfos。 |
Version | String | 是 | 2024-05-08 | API的版本,取值:2024-05-08。 |
Conditions | Object | 否 | -- | 主机信息的筛选条件 |
IdList | Array of String | 否 | ["66eac07353890101c02b3310","66eac07353890101c02b3311"] | 主机ID列表 |
PageNumber | Integer | 是 | 1 | 翻页页码 |
PageSize | Integer | 是 | 10 | 每页的大小 |
SortBy | String | 否 | SortBy | 排序字段 |
SortOrder | String | 否 | Asc | 排序顺序
|
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
TotalCount | Integer | 100 | 全部数据条数 |
PageNumber | Integer | 1 | 当前页面 |
PageSize | Integer | 10 | 页面大小 |
Data | Array of Object | -- | 响应结果 |
POST /?Action=ListHostsBasicInfos&Version=2024-05-08&PageNumber=1&PageSize=10&SortBy=xxxx&SortOrder=Asc HTTP/1.1 Host: seccenter.volcengineapi.com Content-Type: application/json; charset=UTF-8 X-Date: 20241208T061546Z X-Content-Sha256: 287e874e******d653b44d21e Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20241208/cn-beijing/seccenter/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f { "Conditions": { "Hostname": "xxxx", "Ip": "xxxx", "Risk": { "Alarm": true, "Baseline": true, "Virus": true, "Vuln": true }, "SecurityEnhancement": true, "VirusFileAutoIsolate": true, "ProxyName": "xxxx", "ProxyServerName": "xxxx", "AgentIdList": [ "[\"i-ycwdlfegw0qbxyxxxxxx\",\"i-ycwdlfegw0qbxyxxxxxx\"]" ], "AgentStatus": [ "[\"online\",\"offline\"]" ], "AgentId": "i-ycwdlfegw0qbxyxxxxxx", "Platforms": [ "[\"linux\"]" ], "Regions": [ "[\"cn-beijing\"]" ], "VpcIds": [ "[\"vpc-5gudln3kb47473inqlkixxxx\"]" ], "Tags": [ "[\"tag1\",\"tag2\"]" ], "Groups": [ "[\"crl9aa73pfsdrned3gmg\"]" ], "Status": [ "[\"running\"]" ], "Visibility": [ "[\"private\"]" ] }, "IdList": [ "[\"i-ycwdlfegw0qbxyxxxxxx\", \"i-ycwdlfegw0qbxyxxxxxx\"]" ] }
{ "PageInfo": { "PageNumber": 1, "PageSize": 10, "TotalCount": 1 }, "ResponseMetadata": { "RequestId": "2024120814154915923714219459C005", "Action": "ListHostsBasicInfos", "Version": "2024-05-08", "Service": "seccenter", "Region": "cn-beijing" }, "Result": [ { "AbnormalPluginsList": "xxxx", "AgentID": "i-ycwdlfegw0qbxyxxxxxx", "AgentStatus": "online", "CollectStatus": true, "CpuUsage": 1, "Dns": "8.8.8.8", "EcsInstance": { "AccountID": "210070****", "Cpu": 1, "EipAddress": "xxxx", "HostName": "xxxx", "InstanceName": "xxxx", "Mem": 1, "OsName": "xxxx", "OsType": "xxxx", "Platform": "xxxx", "PlatformVersion": "xxxx", "PrimaryIpAddress": "xxxx", "Region": "xxxx", "Status": "xxxx", "Visibility": "xxxx", "VpcId": "xxxx", "VpcName": "xxxx", "ZoneId": "xxxx" }, "FirstHeartbeatTime": 1733380044, "Gateway": "xxxx", "Group": "crl9aa73pfsdrned3gmg", "KernelVersion": "10.0.20348.1850 Build 20348.1850", "LastHeartbeatTime": 1733380044, "MemUsage": 1, "Online": true, "PluginsBriefInfo": "xxxx", "PluginsStatus": "all_online", "Reason": "xxxx", "SecurityEnhancement": true, "StartTime": 1, "Status": "Protecting", "Tags": [ "[\"tag1\",\"tag2\"]" ], "UserStatus": "start_succeed", "UserStatusReason": "xxxx" } ] }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 说明 |
---|---|---|
400 | MissingParameter | 请求参数缺失 |
400 | InvalidParameter | 请求参数错误 |
400 | OperationDenied | 不允许的操作 |
500 | InternalError | 服务器内部错误 |
500 | DBOperateError | 数据库操作异常 |