Skip to main content
node
const fetch = require('node-fetch');

let url = 'https://api.coralogix.com/mgmt/openapi/incidents/incidents/v1/aggregations';

let options = {method: 'GET', headers: {Authorization: 'Bearer <API_KEY>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
{
  "incidentAggs": [
    {
      "aggAssignmentsCount": [
        {
          "assignedTo": {
            "userId": "user_id"
          },
          "count": 10
        }
      ],
      "aggMetaLabelsCount": [
        {
          "count": 10,
          "metaLabel": {
            "key": "key",
            "value": "value"
          }
        }
      ],
      "aggSeverityCount": [
        {
          "count": 10,
          "severity": "INCIDENT_SEVERITY_UNSPECIFIED"
        }
      ],
      "aggStateCount": [
        {
          "count": 10,
          "state": "INCIDENT_STATE_UNSPECIFIED"
        }
      ],
      "aggStatusCount": [
        {
          "count": 10,
          "status": "INCIDENT_STATUS_UNSPECIFIED"
        }
      ],
      "allValuesCount": 123,
      "firstCreatedAt": "2023-11-07T05:31:56Z",
      "groupBysValue": [
        {
          "incidentField": {
            "id": "<string>"
          }
        }
      ],
      "lastClosedAt": "2023-11-07T05:31:56Z",
      "lastStateUpdateTime": "2023-11-07T05:31:56Z",
      "listIncidentsId": [
        "<string>"
      ]
    }
  ],
  "pagination": {
    "nextPageToken": "next_page_token",
    "totalSize": 100
  }
}

Authorizations

Authorization
string
header
required

API key authentication

Response

Response containing aggregated incident data and pagination information

incidentAggs
Incident aggregation · object[]
required
pagination
object
required

Pagination information for list responses

I