Count Findings API

POST/etm/api/rest/v1/findings/count

Use this API to get the count of findings based on the specified query parameters.

Input ParametersInput Parameters

Parameter

Mandatory/Optional

Data Type

Description

query Optional String QQL query string used to filter findings. For example, finding.severity: 5. Default value is null.
havingQuery Optional String Secondary query applied at the finding level within an asset context. Default value is null.

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/findings/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
  }
}