Count of Assets
Get the count of assets satisfying the specified filter criteria.
Input ParametersInput Parameters
The following table includes the input parameters used to get a count of assets.
|
Parameter |
Mandatory/ Optional |
Data Type |
1Description |
|---|---|---|---|
|
filter |
Optional |
String |
Filter the events list 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 - netbiosName: 'acme' AND name: 'acme.qualys.com' Refer to the list of tokens you can use to build the query: Search tokens |
|
lastModifiedDate |
Optional |
String |
Shows records modified on or after this date with the UTC format as yyyy-MM-ddTHH:mmZ e.g. 2019-03-01T11:30Z This date gets updated whenever any activity happens on the asset. Few examples of such activity:
|
|
lastSeenAssetId |
Optional |
Integer |
Use to get the count of assets having an asset ID greater than the specified last-seen asset ID. |
|
Authorization |
Mandatory |
String |
Authorization token to authenticate to the Qualys. Cloud Platform. Prepend the token with Bearer and one space. For example - Bearer authToken |
Sample - Get Count of All AssetsSample - Get Count of All Assets
The following sample request and response are used to get a count of assets satisfying the specified filter criteria.
Request
curl -X POST
"<qualys_base_url>/am/v1/assets/host/count"
-H "Authorization: Bearer <JWTToken>"
-H "Content-Type: application/json"
Response
{
"count": 1119,
"responseCode": "SUCCESS",
"responseMessage": "Valid API Access"
}