API reference
Alert policies
Alert policies endpoints of the StatusTick REST API: list alert policies, create an alert policy, get an alert policy, delete an alert policy.
/v1/alert-policiesThe Default policy first.
Authorization
apiKey Your organization's API key.
In: header
Response Body
application/json
curl -X GET "https://example.com/v1/alert-policies"[ { "id": "string", "name": "string", "isDefault": true, "steps": [ { "delayMinutes": 0, "destinationIds": [ "string" ], "scheduleIds": [ "string" ], "owners": true, "allDestinations": true } ], "repeatEveryMinutes": 0, "notifyOnResolve": true, "workingHours": { "timeZone": "string", "start": "string", "end": "string", "days": [ "MONDAY" ] }, "alertOnDegraded": true, "coolDownMinutes": 0, "groupRelated": true, "usedBy": 0, "failingDestinationIds": [ "string" ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "updatedBy": "string" }]/v1/alert-policiesNeeds a READ_WRITE key from an owner or admin. Step 1 notifies its destinations at once; each later step pages on-call schedules or the owners after delayMinutes without an acknowledge. Destinations must be verified (destination.not_verified.unprocessable otherwise); failing ones are accepted and listed in failingDestinationIds.
Authorization
apiKey Your organization's API key.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/alert-policies" \ -H "Content-Type: application/json" \ -d '{ "name": "Payments", "steps": [ { "destinationIds": [ "itg_6TqLx2Vb9NcR1mWz4KsPaH" ] }, { "delayMinutes": 10, "scheduleIds": [ "ocs_2Wd8Nf5XqLm1Rz7TyBc3Kv" ] } ], "notifyOnResolve": true }'{ "id": "string", "name": "string", "isDefault": true, "steps": [ { "delayMinutes": 0, "destinationIds": [ "string" ], "scheduleIds": [ "string" ], "owners": true, "allDestinations": true } ], "repeatEveryMinutes": 0, "notifyOnResolve": true, "workingHours": { "timeZone": "string", "start": "string", "end": "string", "days": [ "MONDAY" ] }, "alertOnDegraded": true, "coolDownMinutes": 0, "groupRelated": true, "usedBy": 0, "failingDestinationIds": [ "string" ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "updatedBy": "string"}/v1/alert-policies/{policyId}Authorization
apiKey Your organization's API key.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/alert-policies/alp_1M2fXr8ZqT4bNw6cYk0LdA"{ "id": "string", "name": "string", "isDefault": true, "steps": [ { "delayMinutes": 0, "destinationIds": [ "string" ], "scheduleIds": [ "string" ], "owners": true, "allDestinations": true } ], "repeatEveryMinutes": 0, "notifyOnResolve": true, "workingHours": { "timeZone": "string", "start": "string", "end": "string", "days": [ "MONDAY" ] }, "alertOnDegraded": true, "coolDownMinutes": 0, "groupRelated": true, "usedBy": 0, "failingDestinationIds": [ "string" ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "updatedBy": "string"}/v1/alert-policies/{policyId}Needs a READ_WRITE key from an owner or admin. Its monitors go back to the Default policy, which cannot be deleted.
Authorization
apiKey Your organization's API key.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X DELETE "https://example.com/v1/alert-policies/alp_1M2fXr8ZqT4bNw6cYk0LdA"/v1/alert-policies/{policyId}Needs a READ_WRITE key from an owner or admin. Send the whole policy, as for create; coolDownMinutes and groupRelated left out keep their values.
Authorization
apiKey Your organization's API key.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/v1/alert-policies/alp_1M2fXr8ZqT4bNw6cYk0LdA" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "steps": [ {} ] }'{ "id": "string", "name": "string", "isDefault": true, "steps": [ { "delayMinutes": 0, "destinationIds": [ "string" ], "scheduleIds": [ "string" ], "owners": true, "allDestinations": true } ], "repeatEveryMinutes": 0, "notifyOnResolve": true, "workingHours": { "timeZone": "string", "start": "string", "end": "string", "days": [ "MONDAY" ] }, "alertOnDegraded": true, "coolDownMinutes": 0, "groupRelated": true, "usedBy": 0, "failingDestinationIds": [ "string" ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "updatedBy": "string"}/v1/alert-policies/monitorsAuthorization
apiKey Your organization's API key.
In: header
Query Parameters
items <= 500Response Body
application/json
curl -X GET "https://example.com/v1/alert-policies/monitors?monitorIds=string"{ "mnt_4KrVK3M1DqhDTFouCffKie": "alp_1M2fXr8ZqT4bNw6cYk0LdA"}/v1/alert-policies/{policyId}/monitorsNeeds a READ_WRITE key. Choosing the Default policy clears the monitors' choice.
Authorization
apiKey Your organization's API key.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PUT "https://example.com/v1/alert-policies/string/monitors" \ -H "Content-Type: application/json" \ -d '{ "monitorIds": [ "string" ] }'