Count Number of Assets API
Use this API to get the total number of assets.
Input ParametersInput Parameters
Parameter | Mandatory/Optional | Data Type | Description |
---|---|---|---|
query |
Optional |
string |
Filter assets by providing a query using Qualys syntax. Refer to the “How to Search” topic in the online help for assistance. For example, “agentVersion:5.0.0.17” |
groupBy |
Optional |
string |
Group results to fetch count based on values such as agentVersion, agentStatus, and so on. |
API Request
"curl --location --request GET""https://<qualys_base_url>/sm/v1/assets/count?query=agentVersion:5.0.0.17""\\
--header""'Authorization: <Bearer Token>"
Response
{
" ""data":{
" ""count":2
},
" ""timestamp":"2023-01-19T11:07:35.006Z"
}
API Request
"curl --location --request GET""https://<qualys_base_url>/sm/v1/assets/count?groupBy=operatingSystem""\\
--header""'Authorization: <Bearer Token>"
Response
{
" ""data":{
" ""Microsoft Windows 10 Pro 10.0.19044 64-bit N/A Build 19044":3,
" ""CentOS Linux 7.9.2009":1
},
" ""timestamp":"2023-01-19T11:14:56.324Z"
}