Queries the statistical information about assets based on a specified filter condition.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Lang | string | No | The language of the content within the request and response. Default value: zh. Valid values:
| zh |
MachineTypes | string | No | The type of the assets that you want to query. Set the value to ecs, which indicates Elastic Compute Service (ECS) instances. | ecs |
GroupField | string | Yes | The filter condition that you want to use to query the assets. Valid values:
| groupId |
FieldValue | string | No | The name of the group to which the assets belong. Fuzzy search is supported. | test-01 |
NoPage | boolean | No | Specifies whether to enable paged query. Default value: true. Valid values:
| true |
PageSize | integer | No | The number of entries to return on each page. Default value: 20. | 20 |
CurrentPage | integer | No | The number of the page to return. Default value: 1. | 1 |
Vendor | integer | No | The source of the server. Valid values:
| 0 |
Vendors | string | No | The source of the server. Separate multiple sources with commas (,).Valid values:
| 0,8 |
SaleVersionCheckCode | string | No | The edition of Security Center that protects the asset. Valid values:
| sas_gt_basic |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "52A3AEE6-114A-499D-8990-4BA9B27FE0AA",
"PageInfo": {
"CurrentPage": 5,
"PageSize": 20,
"TotalCount": 100,
"Count": 20
},
"Instances": [
{
"AsapVulInstanceCount": 11,
"UnProtectedInstanceCount": "32",
"FieldAliasName": "testA",
"InstanceCount": "205",
"RiskInstanceCount": "172",
"GroupFlag": 1,
"AuthVersionCheckCount": 205,
"Os": "windows",
"InstanceCoreCount": 610
}
]
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | NoPermission | no permission | - |
403 | NoPermission | caller has no permission | You are not authorized to do this operation. |
500 | ServerError | ServerError | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-06-07 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-07-06 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-04-07 | The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |