Skip to content
  • There are no suggestions because the search field is empty.

Incidents API

The Incidents API provides management of status page incidents and maintenance windows, including messages, components, postmortems, and subscriber notifications.

The Incidents API provides management of status page incidents and maintenance windows, including messages, components, postmortems, and subscriber notifications.

Base URLhttps://api.alertops.com/api/v2
Authenticationapi-key request header
Endpoints8

Endpoints

MethodPathDescription
GET/api/v2/incidentsList incidents / maintenance
POST/api/v2/incidentsCreate an incident / maintenance
GET/api/v2/incidents/{id}Get an incident / maintenance
PUT/api/v2/incidents/{id}Update an incident / maintenance
GET/api/v2/incidents/{id}/notificationsList incident notifications
GET/api/v2/incidents/{id}/postmortemGet an incident postmortem
POST/api/v2/incidents/{id}/postmortemCreate an incident postmortem
PUT/api/v2/incidents/{id}/postmortem/{postmortem_id}Update an incident postmortem

List incidents / maintenance

GET /api/v2/incidents

Query parameters

NameTypeRequiredDescription
fromDatestringOptional 
toDatestringOptional 
componentIdstringOptional 

Responses

200 OK

[
  {
    "incident_id": 1234,
    "subject": "Test Subject one",
    "messages": [
      {
        "created_date": "2020-12-09T11:46:00",
        "description": "Test Description one",
        "description_html": "Test Description one",
        "incident_state": "Investigating"
      }
    ],
    "components": [
      {
        "component_id": 11,
        "component_name": "Component 1"
      }
    ],
    "opened_date": "2020-12-09T11:46:00",
    "closed_date": "2020-12-15T09:23:31",
    "is_maintenance": true
  }
]

401 Unauthorized · missing or invalid api-key

Example request

curl -X GET "https://api.alertops.com/api/v2/incidents" \
  -H "api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json"

Create an incident / maintenance

POST /api/v2/incidents

Query parameters

NameTypeRequiredDescription
incidentCreateobjectRequired 

Request body

JSON object.

Example body

{
  "is_maintenance": true,
  "incident_state": "Investigating/ Identified/ Monitoring /Resolved",
  "description": "This is incident/ maintenance decription",
  "component_id": [
    123,
    456
  ],
  "notify_subscribers": true,
  "email": "true (Only if notify_subscribers = true)",
  "sms": "true (Only if notify_subscribers = true)",
  "slack_dm": "false (Only if notify_subscribers = true and accounts enabled)",
  "subject": "This is incident/ maintenance Subject",
  "start_date": "2021-8-6",
  "start_hour": 10,
  "start_minute": 30,
  "duration_minutes": 50,
  "notify_hour_before": true,
  "notify_at_start": true,
  "notify_at_end": true
}

Responses

200 OK

401 Unauthorized · missing or invalid api-key

Example request

curl -X POST "https://api.alertops.com/api/v2/incidents?incidentCreate={incidentCreate}" \
  -H "api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "is_maintenance": true,
  "incident_state": "Investigating/ Identified/ Monitoring /Resolved",
  "description": "This is incident/ maintenance decription",
  "component_id": [
    123,
    456
  ],
  "notify_subscribers": true,
  "email": "true (Only if notify_subscribers = true)",
  "sms": "true (Only if notify_subscribers = true)",
  "slack_dm": "false (Only if notify_subscribers = true and accounts enabled)",
  "subject": "This is incident/ maintenance Subject",
  "start_date": "2021-8-6",
  "start_hour": 10,
  "start_minute": 30,
  "duration_minutes": 50,
  "notify_hour_before": true,
  "notify_at_start": true,
  "notify_at_end": true
}'

Get an incident / maintenance

GET /api/v2/incidents/{id}

Path parameters

NameTypeRequiredDescription
idintegerRequiredThe incident ID.

Responses

200 OK

{
  "incident_id": 1234,
  "is_maintenance": true,
  "subject": "Test Incident Subject",
  "closed_date": "2021-08-06T06:21:05",
  "start_date": "2021-08-06T00:00:00",
  "start_hour": 10,
  "start_minute": 30,
  "duration_minutes": 50,
  "notify_hour_before": true,
  "notify_at_start": true,
  "notify_at_end": true,
  "messages": [
    {
      "created_date": "2020-12-09T11:46:00",
      "description": "Test Description one",
      "description_html": "Test Description one",
      "incident_state": "Monitoring"
    }
  ],
  "components": [
    {
      "component_id": 11,
      "component_name": "Component 1"
    }
  ]
}

401 Unauthorized · missing or invalid api-key

Example request

curl -X GET "https://api.alertops.com/api/v2/incidents/{id}" \
  -H "api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json"

Update an incident / maintenance

PUT /api/v2/incidents/{id}

Path parameters

NameTypeRequiredDescription
idintegerRequiredIncident ID

Query parameters

NameTypeRequiredDescription
incidentUpdateobjectRequired 

Request body

JSON object.

Example body

{
  "is_maintenance": true,
  "incident_state": "Investigating/ Identified/ Monitoring /Resolved",
  "description": "This is incident/ maintenance decription",
  "component_id": [
    123,
    456
  ],
  "notify_subscribers": true,
  "email": "true (Only if notify_subscribers = true)",
  "sms": "true (Only if notify_subscribers = true)",
  "slack_dm": "false (Only if notify_subscribers = true and accounts enabled)",
  "subject": "This is incident/ maintenance Subject",
  "start_date": "2021-8-6",
  "start_hour": 10,
  "start_minute": 30,
  "duration_minutes": 50,
  "notify_hour_before": true,
  "notify_at_start": true,
  "notify_at_end": true
}

Responses

204 No Content · The request was processed successfully. No response body is returned.

401 Unauthorized · missing or invalid api-key

Example request

curl -X PUT "https://api.alertops.com/api/v2/incidents/{id}?incidentUpdate={incidentUpdate}" \
  -H "api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "is_maintenance": true,
  "incident_state": "Investigating/ Identified/ Monitoring /Resolved",
  "description": "This is incident/ maintenance decription",
  "component_id": [
    123,
    456
  ],
  "notify_subscribers": true,
  "email": "true (Only if notify_subscribers = true)",
  "sms": "true (Only if notify_subscribers = true)",
  "slack_dm": "false (Only if notify_subscribers = true and accounts enabled)",
  "subject": "This is incident/ maintenance Subject",
  "start_date": "2021-8-6",
  "start_hour": 10,
  "start_minute": 30,
  "duration_minutes": 50,
  "notify_hour_before": true,
  "notify_at_start": true,
  "notify_at_end": true
}'

List incident notifications

GET /api/v2/incidents/{id}/notifications

Path parameters

NameTypeRequiredDescription
idintegerRequiredIncident ID.

Responses

200 OK

[
  {
    "message_id": 220579,
    "created_date": "2021-06-02T15:07:50",
    "created_by": "Joe Doe",
    "description": "Update incident - Resolved (Notify Email Slack... No SMS) ",
    "description_html": "Update incident - Resolved (Notify Email Slack... No SMS)",
    "incident_state": "Resolved",
    "recipients": [
      {
        "recipient": "Joe Doe",
        "recipient_id": 1534,
        "recipient_type": "User",
        "group_name": "",
        "notifications": [
          {
            "date_sent": "2021-06-02T15:07:52",
            "date_ack": "",
            "status": "Sent",
            "contact": "jdoe@CyberKorp.com",
            "contact_data_type": "EMAIL",
            "contact_type": "Email-Official"
          }
        ]
      }
    ]
  }
]

401 Unauthorized · missing or invalid api-key

Example request

curl -X GET "https://api.alertops.com/api/v2/incidents/{id}/notifications" \
  -H "api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json"

Get an incident postmortem

GET /api/v2/incidents/{id}/postmortem

Path parameters

NameTypeRequiredDescription
idintegerRequiredIncident ID.

Responses

200 OK

{
  "postmortem_id": 17,
  "name": "Resolved",
  "owner": "Joe Doe",
  "status": "Published",
  "impact_start": "2021-03-22T13:27:08",
  "impact_end": "2021-03-26T14:11:27",
  "duration": "4 days, 0 hours, 44 minutes",
  "postmortem_fields": [
    {
      "postmortem_field_id": 163,
      "postmortem_field_name": "Comments",
      "postmortem_field_value": "None"
    }
  ]
}

401 Unauthorized · missing or invalid api-key

Example request

curl -X GET "https://api.alertops.com/api/v2/incidents/{id}/postmortem" \
  -H "api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json"

Create an incident postmortem

POST /api/v2/incidents/{id}/postmortem

Path parameters

NameTypeRequiredDescription
idintegerRequiredIncident ID.

Request body

JSON object (required).

FieldTypeRequired
namestringOptional
statusstringOptional
impact_startstringOptional
impact_endstringOptional
notify_subscribersbooleanRequired
postmortem_fieldsarray of objectsOptional
postmortem_fields[].postmortem_field_idintegerRequired
postmortem_fields[].postmortem_field_valuestringOptional

Example body

{
  "name": "string",
  "status": "string",
  "impact_start": "string",
  "impact_end": "string",
  "notify_subscribers": true,
  "postmortem_fields": [
    {
      "postmortem_field_id": 0,
      "postmortem_field_value": "string"
    }
  ]
}

Responses

200 OK

401 Unauthorized · missing or invalid api-key

Example request

curl -X POST "https://api.alertops.com/api/v2/incidents/{id}/postmortem" \
  -H "api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "status": "string",
  "impact_start": "string",
  "impact_end": "string",
  "notify_subscribers": true,
  "postmortem_fields": [
    {
      "postmortem_field_id": 0,
      "postmortem_field_value": "string"
    }
  ]
}'

Update an incident postmortem

PUT /api/v2/incidents/{id}/postmortem/{postmortem_id}

Path parameters

NameTypeRequiredDescription
idintegerRequiredIncident ID.
postmortem_idintegerRequiredThe postmortem ID.

Request body

JSON object (required).

FieldTypeRequired
namestringOptional
statusstringOptional
impact_startstringOptional
impact_endstringOptional
notify_subscribersbooleanRequired
postmortem_fieldsarray of objectsOptional
postmortem_fields[].postmortem_field_idintegerRequired
postmortem_fields[].postmortem_field_valuestringOptional

Example body

{
  "name": "string",
  "status": "string",
  "impact_start": "string",
  "impact_end": "string",
  "notify_subscribers": true,
  "postmortem_fields": [
    {
      "postmortem_field_id": 0,
      "postmortem_field_value": "string"
    }
  ]
}

Responses

204 No Content · The request was processed successfully. No response body is returned.

401 Unauthorized · missing or invalid api-key

Example request

curl -X PUT "https://api.alertops.com/api/v2/incidents/{id}/postmortem/{postmortem_id}" \
  -H "api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "status": "string",
  "impact_start": "string",
  "impact_end": "string",
  "notify_subscribers": true,
  "postmortem_fields": [
    {
      "postmortem_field_id": 0,
      "postmortem_field_value": "string"
    }
  ]
}'