Skip to main content
Assign incidents to a user
curl --request POST \
  --url https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/by-user \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "assignedTo": {
    "userId": "user_id"
  },
  "incidentIds": [
    "incident_id_1",
    "incident_id_2"
  ]
}
'
{
  "incidents": [
    {
      "assignments": [
        {
          "assignedBy": {
            "userId": "user_id"
          },
          "assignedTo": {
            "userId": "user_id"
          }
        }
      ],
      "contextualLabels": {},
      "createdAt": "2024-01-01T00:00:00.000Z",
      "displayLabels": {},
      "duration": "<string>",
      "events": [
        {
          "administrativeEvent": {
            "userId": "<string>"
          },
          "id": "incident_event_id",
          "incidentEventType": "INCIDENT_EVENT_TYPE_UNSPECIFIED",
          "originatorType": "ORIGINATOR_TYPE_UNSPECIFIED",
          "unassign": {}
        }
      ],
      "id": "incident_id",
      "lastStateUpdateKey": "last_state_update_key",
      "lastStateUpdateTime": "2024-01-01T00:00:00.000Z",
      "severity": "INCIDENT_SEVERITY_UNSPECIFIED",
      "state": "INCIDENT_STATE_UNSPECIFIED",
      "status": "INCIDENT_STATUS_UNSPECIFIED",
      "closedAt": "2024-01-01T00:00:00.000Z",
      "description": "incident_description",
      "isMuted": false,
      "metaLabels": [
        {
          "key": "key",
          "value": "value"
        }
      ],
      "name": "incident_name"
    }
  ]
}

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json

Request to assign one or more incidents to a user

assignedTo
User details · object
required
incidentIds
string[]
required

List of incident IDs to assign

Example:
["incident_id_1", "incident_id_2"]

Response

Response containing the updated incidents after assignment

incidents
Incident · object[]
required