Group Findings API

POST/etm/api/rest/v1/findings/group

Use this API to group findings by one or more fields and return the count for each group. This is useful for dashboards and summary views, for example, to identify how many findings exist per severity level.

Input ParametersInput Parameters

Parameter

Mandatory/Optional

Data Type

Description

groupBy Mandatory List<String> Specify the group by criteria.
pageSize Optional Integer

Provide the number of records per page to be included in the response.

Default: 20

groupByFilter Optional String Provide a filter to be applied after grouping

nestedResult

Optional

Boolean

Specify whether the response should be returned as a nested structure or a flat list.

Default: false

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/group'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer <JWT Token>'
--data '{
    "query": "asset.criticalityScore:4",
    "havingQuery": "",
    "groupBy": [
        "finding.type"
    ]
}'
    

Response

{
  "data": [
    {
      "finding.type": "VULNERABILITY",
      "count": 224447
    },
    {
      "finding.type": "MISCONFIGURATION",
      "count": 9226
    }
  ]
}