Services API
The Services API provides full management of status page services, including components, subscribers, templates, and notification preferences.
The Services API provides full management of status page services, including components, subscribers, templates, and notification preferences.
| Base URL | https://api.alertops.com/api/v2 |
| Authentication | api-key request header |
| Endpoints | 23 |
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/v2/services | List services |
| POST | /api/v2/services | Create a service |
| GET | /api/v2/services/{id} | Get a service |
| PUT | /api/v2/services/{id} | Update a service |
| DELETE | /api/v2/services/{id} | Delete a service |
| GET | /api/v2/services/{id}/components | List a service's components |
| POST | /api/v2/services/{id}/components | Create a service's component |
| GET | /api/v2/services/{id}/components/{component_id} | Get a service's component |
| PUT | /api/v2/services/{id}/components/{component_id} | Update a service's component |
| DELETE | /api/v2/services/{id}/components/{component_id} | Delete a service's component |
| GET | /api/v2/services/{id}/components/{component_id}/users | List a service's component subscribers |
| PUT | /api/v2/services/{id}/components/{component_id}/users/{user_id} | Update a user's subscription to a service component |
| GET | /api/v2/services/{id}/templates | List a service's templates |
| POST | /api/v2/services/{id}/templates | Create a service's template |
| GET | /api/v2/services/{id}/templates/{template_id} | Get a service's template |
| PUT | /api/v2/services/{id}/templates/{template_id} | Update a service's template |
| DELETE | /api/v2/services/{id}/templates/{template_id} | Delete a service's template |
| GET | /api/v2/services/{id}/users | List a service's subscribers |
| PUT | /api/v2/services/{id}/users/{user_id} | Update a user's subscription to a service |
| DELETE | /api/v2/services/{id}/users/{user_id} | Unsubscribe a user from a service |
| PUT | /api/v2/services/subscriptions/email | Update a user email subscription |
| PUT | /api/v2/services/subscriptions/slack_dm | Update a user SlackDM subscription |
| PUT | /api/v2/services/subscriptions/sms | Update a user SMS subscription |
List services
GET /api/v2/services
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
include | string | Optional | Default Empty. Eg. components or templates |
Responses
200 OK
[
{
"service_id": 1234,
"service_name": "Service Name Sample 1",
"service_status": "Degraded",
"show_uptime": true,
"components": [
{
"component_id": 1235,
"component_name": "Component Name Sample 1",
"external_id": "ExtID 1",
"component_status": "Degraded"
}
],
"templates": [
{
"template_id": 111,
"template_name": "Template Name Sample 1",
"message": "Message text",
"subject": "Test Subject"
}
]
}
]401 Unauthorized · missing or invalid api-key
Example request
curl -X GET "https://api.alertops.com/api/v2/services" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"Create a service
POST /api/v2/services
Request body
JSON object (required).
| Field | Type | Required |
|---|---|---|
service_name | string | Optional |
show_uptime | boolean | Required |
components | array of objects | Optional |
components[].component_name | string | Optional |
components[].external_id | string | Optional |
templates | array of objects | Optional |
templates[].template_name | string | Optional |
templates[].message | string | Optional |
templates[].subject | string | Optional |
Example body
{
"service_name": "string",
"show_uptime": true,
"components": [
{
"component_name": "string",
"external_id": "string"
}
],
"templates": [
{
"template_name": "string",
"message": "string",
"subject": "string"
}
]
}Responses
200 OK
401 Unauthorized · missing or invalid api-key
Example request
curl -X POST "https://api.alertops.com/api/v2/services" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"service_name": "string",
"show_uptime": true,
"components": [
{
"component_name": "string",
"external_id": "string"
}
],
"templates": [
{
"template_name": "string",
"message": "string",
"subject": "string"
}
]
}'Get a service
GET /api/v2/services/{id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Service ID or Service name |
Responses
200 OK
{
"service_id": 12345,
"service_name": "Service Name sample 1",
"service_status": "Operational",
"show_uptime": true,
"components": [
{
"component_id": 1236,
"component_name": "Component Name sample 1",
"external_id": "ExtID 1",
"component_status": "Operational"
}
],
"templates": [
{
"template_id": 123,
"template_name": "Template Name sample 1",
"message": "S3 TATemplate Message text sampleS3 TCS3 TD",
"subject": "Test Subject"
}
]
}401 Unauthorized · missing or invalid api-key
Example request
curl -X GET "https://api.alertops.com/api/v2/services/{id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"Update a service
PUT /api/v2/services/{id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Service ID or Service name |
Request body
JSON object (required).
| Field | Type | Required |
|---|---|---|
service_name | string | Optional |
show_uptime | boolean | Required |
components | array of objects | Optional |
components[].component_name | string | Optional |
components[].external_id | string | Optional |
components[].component_id | integer | Required |
templates | array of objects | Optional |
templates[].template_name | string | Optional |
templates[].message | string | Optional |
templates[].subject | string | Optional |
templates[].template_id | integer | Required |
Example body
{
"service_name": "string",
"show_uptime": true,
"components": [
{
"component_name": "string",
"external_id": "string",
"component_id": 0
}
],
"templates": [
{
"template_name": "string",
"message": "string",
"subject": "string",
"template_id": 0
}
]
}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/services/{id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"service_name": "string",
"show_uptime": true,
"components": [
{
"component_name": "string",
"external_id": "string",
"component_id": 0
}
],
"templates": [
{
"template_name": "string",
"message": "string",
"subject": "string",
"template_id": 0
}
]
}'Delete a service
DELETE /api/v2/services/{id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Service ID or Service name |
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 DELETE "https://api.alertops.com/api/v2/services/{id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"List a service's components
GET /api/v2/services/{id}/components
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Service ID or Service name |
Responses
200 OK
[
{
"component_id": 1235,
"component_name": "Component Sample Name 1",
"external_id": "ExtID 1",
"component_status": "Operational"
}
]401 Unauthorized · missing or invalid api-key
Example request
curl -X GET "https://api.alertops.com/api/v2/services/{id}/components" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"Create a service's component
POST /api/v2/services/{id}/components
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Service ID or Service name |
Request body
JSON object (required).
| Field | Type | Required |
|---|---|---|
component_name | string | Optional |
external_id | string | Optional |
Example body
{
"component_name": "string",
"external_id": "string"
}Responses
200 OK
401 Unauthorized · missing or invalid api-key
Example request
curl -X POST "https://api.alertops.com/api/v2/services/{id}/components" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"component_name":"string","external_id":"string"}'Get a service's component
GET /api/v2/services/{id}/components/{component_id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Service ID or Service name |
component_id | string | Required | The component ID. |
Responses
200 OK
{
"component_id": 1234,
"component_name": "Component Sample Name 1",
"external_id": "ExtID 1",
"component_status": "Operational"
}401 Unauthorized · missing or invalid api-key
Example request
curl -X GET "https://api.alertops.com/api/v2/services/{id}/components/{component_id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"Update a service's component
PUT /api/v2/services/{id}/components/{component_id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Service ID or Service name |
component_id | string | Required | The component ID. |
Request body
JSON object (required).
| Field | Type | Required |
|---|---|---|
component_name | string | Optional |
external_id | string | Optional |
component_id | integer | Required |
Example body
{
"component_name": "string",
"external_id": "string",
"component_id": 0
}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/services/{id}/components/{component_id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"component_name":"string","external_id":"string","component_id":0}'Delete a service's component
DELETE /api/v2/services/{id}/components/{component_id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Service ID or Service name |
component_id | string | Required | ComponentID |
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 DELETE "https://api.alertops.com/api/v2/services/{id}/components/{component_id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"List a service's component subscribers
GET /api/v2/services/{id}/components/{component_id}/users
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Service ID or Service name |
component_id | string | Required | Component ID |
Responses
200 OK
[
{
"user_id": 123,
"user_name": "testuser",
"first_name": "Joe",
"last_name": "Doe",
"email": true,
"sms": false,
"slack_dm": false,
"sms_enabled": false,
"slack_dm_enabled": true
}
]401 Unauthorized · missing or invalid api-key
Example request
curl -X GET "https://api.alertops.com/api/v2/services/{id}/components/{component_id}/users" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"Update a user's subscription to a service component
PUT /api/v2/services/{id}/components/{component_id}/users/{user_id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Service ID or Service name |
component_id | string | Required | Component ID |
user_id | string | Required | User ID or User Name |
Request body
JSON object (required).
| Field | Type | Required |
|---|---|---|
email | boolean | Required |
sms | boolean | Required |
slack_dm | boolean | Required |
Example body
{
"email": true,
"sms": true,
"slack_dm": 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/services/{id}/components/{component_id}/users/{user_id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"email":true,"sms":true,"slack_dm":true}'List a service's templates
GET /api/v2/services/{id}/templates
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Service ID or Service name |
Responses
200 OK
[
{
"template_id": 1234,
"template_name": "Service Template Name Sample 1",
"message": "Message Text1",
"subject": "Test"
}
]401 Unauthorized · missing or invalid api-key
Example request
curl -X GET "https://api.alertops.com/api/v2/services/{id}/templates" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"Create a service's template
POST /api/v2/services/{id}/templates
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Service ID or Service name |
Request body
JSON object (required).
| Field | Type | Required |
|---|---|---|
template_name | string | Optional |
message | string | Optional |
subject | string | Optional |
Example body
{
"template_name": "string",
"message": "string",
"subject": "string"
}Responses
200 OK
401 Unauthorized · missing or invalid api-key
Example request
curl -X POST "https://api.alertops.com/api/v2/services/{id}/templates" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"template_name":"string","message":"string","subject":"string"}'Get a service's template
GET /api/v2/services/{id}/templates/{template_id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Service ID or Service name |
template_id | string | Required | TemplateID |
Responses
200 OK
{
"template_id": 1234,
"template_name": "Service Template Name Sample 1",
"message": "Message Text1",
"subject": "Test"
}401 Unauthorized · missing or invalid api-key
Example request
curl -X GET "https://api.alertops.com/api/v2/services/{id}/templates/{template_id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"Update a service's template
PUT /api/v2/services/{id}/templates/{template_id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Service ID or Service name |
template_id | string | Required | The template ID. |
Request body
JSON object (required).
| Field | Type | Required |
|---|---|---|
template_name | string | Optional |
message | string | Optional |
subject | string | Optional |
template_id | integer | Required |
Example body
{
"template_name": "string",
"message": "string",
"subject": "string",
"template_id": 0
}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/services/{id}/templates/{template_id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"template_name":"string","message":"string","subject":"string","template_id":0}'Delete a service's template
DELETE /api/v2/services/{id}/templates/{template_id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Service ID or Service name |
template_id | string | Required | The template ID. |
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 DELETE "https://api.alertops.com/api/v2/services/{id}/templates/{template_id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"List a service's subscribers
GET /api/v2/services/{id}/users
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Service ID or Service name |
Responses
200 OK
[
{
"component_id": 176,
"users": [
{
"user_id": 123,
"user_name": "testuser",
"first_name": "Joe",
"last_name": "Doe",
"email": true,
"sms": false,
"slack_dm": false,
"sms_enabled": false,
"slack_dm_enabled": true
}
]
}
]401 Unauthorized · missing or invalid api-key
Example request
curl -X GET "https://api.alertops.com/api/v2/services/{id}/users" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"Update a user's subscription to a service
PUT /api/v2/services/{id}/users/{user_id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Service ID or Service name |
user_id | string | Required | User ID or User Name |
Request body
JSON object (required).
| Field | Type | Required |
|---|---|---|
components | array of objects | Optional |
components[].component_id | integer | Optional |
components[].email | boolean | Required |
components[].sms | boolean | Required |
components[].slack_dm | boolean | Required |
Example body
{
"components": [
{
"component_id": 0,
"email": true,
"sms": true,
"slack_dm": 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/services/{id}/users/{user_id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"components":[{"component_id":0,"email":true,"sms":true,"slack_dm":true}]}'Unsubscribe a user from a service
DELETE /api/v2/services/{id}/users/{user_id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Service ID or Service name |
user_id | string | Required | User ID or User Name |
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 DELETE "https://api.alertops.com/api/v2/services/{id}/users/{user_id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"Update a user email subscription
PUT /api/v2/services/subscriptions/email
Request body
JSON object (required).
| Field | Type | Required |
|---|---|---|
subscribe | boolean | Required |
Example body
{
"subscribe": true
}Responses
200 OK
401 Unauthorized · missing or invalid api-key
Example request
curl -X PUT "https://api.alertops.com/api/v2/services/subscriptions/email" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"subscribe":true}'Update a user SlackDM subscription
PUT /api/v2/services/subscriptions/slack_dm
Request body
JSON object (required).
| Field | Type | Required |
|---|---|---|
subscribe | boolean | Required |
Example body
{
"subscribe": true
}Responses
200 OK
401 Unauthorized · missing or invalid api-key
Example request
curl -X PUT "https://api.alertops.com/api/v2/services/subscriptions/slack_dm" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"subscribe":true}'Update a user SMS subscription
PUT /api/v2/services/subscriptions/sms
Request body
JSON object (required).
| Field | Type | Required |
|---|---|---|
subscribe | boolean | Required |
Example body
{
"subscribe": true
}Responses
200 OK
401 Unauthorized · missing or invalid api-key
Example request
curl -X PUT "https://api.alertops.com/api/v2/services/subscriptions/sms" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"subscribe":true}'