Escalation policies HTTP API
Create an escalation policy
Required permission: grafana-oncall-app.escalation-chains:write
curl "{{API_URL}}/api/v1/escalation_policies/" \
--request POST \
--header "Authorization: meowmeowmeow" \
--header "Content-Type: application/json" \
--data '{
"escalation_chain_id": "F5JU6KJET33FE",
"type": "wait",
"duration": 60
}'
The above command returns JSON structured in the following way:
{
"id": "E3GA6SJETWWJS",
"escalation_chain_id": "F5JU6KJET33FE",
"position": 0,
"type": "wait",
"duration": 60
}
HTTP request
POST {{API_URL}}/api/v1/escalation_policies/
Get an escalation policy
Required permission: grafana-oncall-app.escalation-chains:read
curl "{{API_URL}}/api/v1/escalation_policies/E3GA6SJETWWJS/" \
--request GET \
--header "Authorization: meowmeowmeow" \
--header "Content-Type: application/json" \
The above command returns JSON structured in the following way:
{
"id": "E3GA6SJETWWJS",
"escalation_chain_id": "F5JU6KJET33FE",
"position": 0,
"type": "wait",
"duration": 60
}
Update an escalation policy
Required permission: grafana-oncall-app.escalation-chains:write
curl "{{API_URL}}/api/v1/escalation_policies/E3GA6SJETWWJS/" \
--request PUT \
--header "Authorization: meowmeowmeow" \
--header "Content-Type: application/json" \
--data '{
"type": "wait",
"duration": 300,
}'
The above command returns JSON structured in the following way:
{
"id": "E3GA6SJETWWJS",
"escalation_chain_id": "F5JU6KJET33FE",
"position": 0,
"type": "wait",
"duration": 300
}
HTTP request
PUT {{API_URL}}/api/v1/on_call_shifts/<ON_CALL_SHIFT_ID>/
HTTP request
GET {{API_URL}}/api/v1/escalation_policies/<ESCALATION_POLICY_ID>/
List escalation policies
Required permission: grafana-oncall-app.escalation-chains:read
curl "{{API_URL}}/api/v1/escalation_policies/" \
--request GET \
--header "Authorization: meowmeowmeow" \
--header "Content-Type: application/json"
The above command returns JSON structured in the following way:
Note: The response is paginated. You may need to make multiple requests to get all records.
The following available filter parameter should be provided as a GET
argument:
escalation_chain_id
HTTP request
GET {{API_URL}}/api/v1/escalation_policies/
Delete an escalation policy
Required permission: grafana-oncall-app.escalation-chains:write
curl "{{API_URL}}/api/v1/escalation_policies/E3GA6SJETWWJS/" \
--request DELETE \
--header "Authorization: meowmeowmeow" \
--header "Content-Type: application/json"
HTTP request
DELETE {{API_URL}}/api/v1/escalation_policies/<ESCALATION_POLICY_ID>/