Count Asset API
Use this API to get the count of assets matching the specified query criteria.
Input ParametersInput Parameters
|
Parameter |
Mandatory/Optional |
Data Type |
Description |
|---|---|---|---|
| query | Optional | String | Provide QQL query asset.criticalityScore: 4 |
| havingQuery | Optional | String | Provide a secondary query applied at the finding level within an asset context. |
|
Authorization |
Mandatory |
String |
Authorization token to authenticate to the Qualys Enterprise TruRisk Platform Prepend token with Bearer and one space. For example - Bearer authToken |
SampleSample
API Request
curl -X 'POST'
'<qualys_base_url>/etm/api/rest/v1/assets/count'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer <JWT Token>'
--data '{
"query ": " ",
"havingQuery ": "(finding.type: Vulnerability) and ((finding.truConfirm.status: "Exploit Validated ") and ((finding.truConfirm.status: "Exploit Validated ") and (finding.typeDetected: [`Confirmed`, `Potential`, `Sensitive Content`] and finding.status: [`NEW`, `ACTIVE`, `REOPENED`] and finding.isIgnored: FALSE))) "
}'
Response
{
"data": {
"count": 15
}
}