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 URL | https://api.alertops.com/api/v2 |
| Authentication | api-key request header |
| Endpoints | 8 |
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/v2/incidents | List incidents / maintenance |
| POST | /api/v2/incidents | Create 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}/notifications | List incident notifications |
| GET | /api/v2/incidents/{id}/postmortem | Get an incident postmortem |
| POST | /api/v2/incidents/{id}/postmortem | Create an incident postmortem |
| PUT | /api/v2/incidents/{id}/postmortem/{postmortem_id} | Update an incident postmortem |
List incidents / maintenance
GET /api/v2/incidents
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
fromDate | string | Optional | |
toDate | string | Optional | |
componentId | string | Optional |
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
| Name | Type | Required | Description |
|---|---|---|---|
incidentCreate | object | Required |
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
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Required | The 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
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Required | Incident ID |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
incidentUpdate | object | Required |
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
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Required | Incident 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
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Required | Incident 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
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Required | Incident ID. |
Request body
JSON object (required).
| Field | Type | Required |
|---|---|---|
name | string | Optional |
status | string | Optional |
impact_start | string | Optional |
impact_end | string | Optional |
notify_subscribers | boolean | Required |
postmortem_fields | array of objects | Optional |
postmortem_fields[].postmortem_field_id | integer | Required |
postmortem_fields[].postmortem_field_value | string | Optional |
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
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Required | Incident ID. |
postmortem_id | integer | Required | The postmortem ID. |
Request body
JSON object (required).
| Field | Type | Required |
|---|---|---|
name | string | Optional |
status | string | Optional |
impact_start | string | Optional |
impact_end | string | Optional |
notify_subscribers | boolean | Required |
postmortem_fields | array of objects | Optional |
postmortem_fields[].postmortem_field_id | integer | Required |
postmortem_fields[].postmortem_field_value | string | Optional |
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"
}
]
}'