Use this API to count the assets based on criteria.
Parameter |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
Authorization |
Mandatory |
String |
Authorization token to authenticate to the Qualys Cloud Platform. Prepend token with "Bearer" and one space. For example - Bearer authToken |
filter | Optional | String |
Filter the Assets by providing a query using Qualys syntax. Refer to the “How to Search” topic in the Online Help for assistance with creating your query. For example - operatingSystem:'Microsoft Windows 10' |
groupBy | Optional | String |
Group results based on certain parameters (provide comma separated list). For example - operatingSystem |
interval | Optional | String |
GroupBy interval for date fields. Valid values are y(year), q(quarter), M(month), w(week), d(day), h(hour), m(minute), s(second). For example - 1d An interval lower than a second is not supported. Note: Value for each interval period should be 1. For example, you can specify an interval of 1y, 1M, 1w, and so on, but not 2y, 3M, etc. |
limit | Optional | String | Limit the number of rows fetched by the groupBy function. |
sort | Optional | String |
Sort the results using a Qualys token. For example - [{\"operatingSystem\":\"asc\"} |
API Request
curl -X POST
<qualys_base_url>
/fim/v3/assets/count
-H 'authorization: Bearer <token> '
-H 'content-type: application/json'
-d @request.json
Contents of request.json:
{
"Rename": 9030024, "Attributes": 541520, "Delete": 340857,
"Create": 265141, "Security": 189813, "Content": 29497
}
Response
{
"FIM_MANIFEST_PUBLISHED": 20010,
"FIM_ACTIVATION_REQUEST_RECEIVED": 10027
}