POST
/
v1
/
incidents:resolve
const fetch = require('node-fetch');

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

let options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
  body: '{"incidentIds":["incident_id_1","incident_id_2"]}'
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
{
  "incidents": [
    {
      "id": "incident_id",
      "name": "incident_name",
      "state": "INCIDENT_STATE_UNSPECIFIED",
      "status": "INCIDENT_STATUS_UNSPECIFIED",
      "assignments": [
        {
          "assignedTo": {
            "userId": "user_id"
          },
          "assignedBy": {
            "userId": "user_id"
          }
        }
      ],
      "description": "incident_description",
      "severity": "INCIDENT_SEVERITY_UNSPECIFIED",
      "contextualLabels": {},
      "displayLabels": {},
      "events": [
        {
          "id": "incident_event_id",
          "incidentEventType": "INCIDENT_EVENT_TYPE_UNSPECIFIED",
          "snoozeIndicator": {
            "startTime": "2023-11-07T05:31:56Z",
            "durationMinutes": 123,
            "userId": "<string>"
          },
          "assignment": {
            "assignment": {
              "assignedTo": {
                "userId": "user_id"
              },
              "assignedBy": {
                "userId": "user_id"
              }
            }
          },
          "unassign": {},
          "upsertState": {
            "stateType": "UPSERT_INCIDENT_STATE_TYPE_UNSPECIFIED",
            "payload": {
              "cxEventKey": "<string>"
            },
            "isMuted": true
          },
          "acknowledge": {
            "acknowledgedBy": {
              "userId": "user_id"
            }
          },
          "close": {
            "closedBy": {
              "userId": "user_id"
            }
          },
          "originatorType": "ORIGINATOR_TYPE_UNSPECIFIED",
          "administrativeEvent": {
            "userId": "<string>"
          },
          "operationalEvent": {
            "systemName": "<string>"
          }
        }
      ],
      "createdAt": "2024-01-01T00:00:00.000Z",
      "closedAt": "2024-01-01T00:00:00.000Z",
      "lastStateUpdateTime": "2024-01-01T00:00:00.000Z",
      "lastStateUpdateKey": "last_state_update_key",
      "isMuted": false,
      "metaLabels": [
        {
          "key": "key",
          "value": "value"
        }
      ],
      "duration": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json

Request to resolve one or more incidents

Response

200
application/json

A successful response.

Response containing the updated incidents after resolution