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

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

let options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
  body: '{"filter":{"applicationName":["string"],"assignee":["string"],"contextualLabels":[{"key":"string","value":{"contextualLabelValues":["string"]}}],"createdAtRange":{"endTime":"2019-08-24T14:15:22Z","startTime":"2019-08-24T14:15:22Z"},"displayLabels":[{"key":"string","value":{"displayLabelValues":["string"]}}],"endTime":"2019-08-24T14:15:22Z","incidentDurationRange":{"endTime":"2019-08-24T14:15:22Z","startTime":"2019-08-24T14:15:22Z"},"isMuted":true,"metaLabels":[{"key":"key","value":"value"}],"metaLabelsOp":"FILTER_OPERATOR_OR_OR_UNSPECIFIED","searchQuery":{"incidentField":"INCIDENTS_FIELDS_UNSPECIFIED","query":"error"},"severity":["INCIDENT_SEVERITY_UNSPECIFIED"],"startTime":"2019-08-24T14:15:22Z","state":["INCIDENT_STATE_UNSPECIFIED"],"status":["INCIDENT_STATUS_UNSPECIFIED"],"subsystemName":["string"]},"orderBys":[{"direction":"ORDER_BY_DIRECTION_UNSPECIFIED","incidentField":"INCIDENTS_FIELDS_UNSPECIFIED"}],"pagination":{"pageSize":10,"pageToken":"next_page_token"}}'
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
{
  "incidents": [
    {
      "assignments": [
        {
          "assignedBy": {
            "userId": "<any>"
          },
          "assignedTo": {
            "userId": "<any>"
          }
        }
      ],
      "closedAt": "2024-01-01T00:00:00.000Z",
      "contextualLabels": [
        {
          "key": "<string>",
          "value": "<string>"
        }
      ],
      "createdAt": "2024-01-01T00:00:00.000Z",
      "description": "incident_description",
      "displayLabels": [
        {
          "key": "<string>",
          "value": "<string>"
        }
      ],
      "duration": "<string>",
      "events": [
        {
          "administrativeEvent": {
            "userId": "<string>"
          },
          "id": "incident_event_id",
          "incidentEventType": "INCIDENT_EVENT_TYPE_UNSPECIFIED",
          "originatorType": "ORIGINATOR_TYPE_UNSPECIFIED",
          "snoozeIndicator": {
            "durationMinutes": 123,
            "startTime": "2023-11-07T05:31:56Z",
            "userId": "<string>"
          }
        }
      ],
      "id": "incident_id",
      "isMuted": false,
      "lastStateUpdateKey": "last_state_update_key",
      "lastStateUpdateTime": "2024-01-01T00:00:00.000Z",
      "metaLabels": [
        {
          "key": "key",
          "value": "value"
        }
      ],
      "name": "incident_name",
      "severity": "INCIDENT_SEVERITY_UNSPECIFIED",
      "state": "INCIDENT_STATE_UNSPECIFIED",
      "status": "INCIDENT_STATUS_UNSPECIFIED"
    }
  ],
  "pagination": {
    "nextPageToken": "next_page_token",
    "totalSize": 100
  }
}

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json

Request to list incidents with filtering, pagination and ordering options

filter
object

Filter configuration for incidents

orderBys
Incident order by · object[]
  • Incident order by
  • Incident order by
pagination
object

Pagination parameters for list requests

Response

Response containing a list of incidents and pagination information

incidents
Incident · object[]
required
pagination
object
required

Pagination information for list responses

I