Escalation HTTP API
Required permission: grafana-irm-app.alert-groups:direct-paging
Refer to Manual paging integration for more background on how escalating to a team or users works.
Escalate to a set of users
For more details about how to fetch a user’s Grafana OnCall ID, refer to the Users public API documentation.
curl "{{API_URL}}/api/v1/escalation/" \
--request POST \
--header "Authorization: meowmeowmeow" \
--header "Content-Type: application/json" \
--header "X-Grafana-URL: https://your-stack.grafana.net" \
--data '{
"title": "We are seeing a network outage in the datacenter",
"message": "I need help investigating, can you join the investigation?",
"source_url": "https://github.com/myorg/myrepo/issues/123",
"users": [
{
"id": "U281SN24AVVJX",
"important": false
},
{
"id": "U5AKCVNDEDUE7",
"important": true
}
],
"metadata": {
"service": "payments_service",
"zoom_meeting_link": "https://zoom.us/j/123456789?pwd=abc123xyz"
}
}'Using usernames instead of IDs
You can also reference users by their username instead of their Grafana OnCall ID:
curl "{{API_URL}}/api/v1/escalation/" \
--request POST \
--header "Authorization: meowmeowmeow" \
--header "Content-Type: application/json" \
--header "X-Grafana-URL: https://your-stack.grafana.net" \
--data '{
"title": "We are seeing a network outage in the datacenter",
"message": "I need help investigating, can you join the investigation?",
"users": [
{
"username": "alice",
"important": false
},
{
"username": "bob",
"important": true
}
]
}'You can mix id and username in the same request, but each user entry must use only one identifier.
The above command returns JSON structured in the following way:
{
"id": "IZHCC4GTNPZ93",
"integration_id": "CC3GZYZNIIEH5",
"route_id": "RDN8LITALJXCJ",
"alerts_count": 1,
"state": "firing",
"created_at": "2024-08-15T18:05:36.801215Z",
"resolved_at": null,
"resolved_by": null,
"acknowledged_at": null,
"acknowledged_by": null,
"title": "We're seeing a network outage in the datacenter",
"permalinks": {
"slack": null,
"slack_app": null,
"telegram": null,
"web": "http://<my_grafana_url>/a/grafana-irm-app/alert-groups/I5LAZ2MXGPUAH"
},
"silenced_at": null
}Escalate to a team
For more details about how to fetch a team’s Grafana OnCall ID, refer to the Teams public API documentation.
curl "{{API_URL}}/api/v1/escalation/" \
--request POST \
--header "Authorization: meowmeowmeow" \
--header "Content-Type: application/json" \
--header "X-Grafana-URL: https://your-stack.grafana.net" \
--data '{
"title": "We are seeing a network outage in the datacenter",
"message": "I need help investigating, can you join the investigation?",
"source_url": "https://github.com/myorg/myrepo/issues/123",
"team": "TI73TDU19W48J",
"important_team_escalation": true,
"metadata": {
"service": "payments_service",
"zoom_meeting_link": "https://zoom.us/j/123456789?pwd=abc123xyz"
}
}'Using team name instead of ID
You can also reference a team by its name instead of its Grafana OnCall ID:
curl "{{API_URL}}/api/v1/escalation/" \
--request POST \
--header "Authorization: meowmeowmeow" \
--header "Content-Type: application/json" \
--header "X-Grafana-URL: https://your-stack.grafana.net" \
--data '{
"title": "We are seeing a network outage in the datacenter",
"message": "I need help investigating, can you join the investigation?",
"team_name": "Platform Team",
"important_team_escalation": true
}'The above command returns JSON structured in the following way:
{
"id": "IZHCC4GTNPZ93",
"integration_id": "CC3GZYZNIIEH5",
"route_id": "RDN8LITALJXCJ",
"alerts_count": 1,
"state": "firing",
"created_at": "2024-08-15T18:05:36.801215Z",
"resolved_at": null,
"resolved_by": null,
"acknowledged_at": null,
"acknowledged_by": null,
"title": "We're seeing a network outage in the datacenter",
"permalinks": {
"slack": null,
"slack_app": null,
"telegram": null,
"web": "http://<my_grafana_url>/a/grafana-irm-app/alert-groups/I5LAZ2MXGPUAH"
},
"silenced_at": null
}Escalate with incident context
When paging users or teams from within an incident, you can include an incident_id to link the escalation to the incident. This enables paged responders to appear in the incident’s “Paged Participants” section and timeline.
curl "{{API_URL}}/api/v1/escalation/" \
--request POST \
--header "Authorization: meowmeowmeow" \
--header "Content-Type: application/json" \
--header "X-Grafana-URL: https://your-stack.grafana.net" \
--data '{
"title": "Production Database Outage",
"message": "You have been paged for an incident",
"users": [
{
"username": "alice",
"important": true
}
],
"incident_id": "INC-123"
}'When incident_id is provided:
- The alert group’s
grafana_incident_idis set to the incident ID - An incident reference is added, populating the “Paged Participants” UI section
- A timeline activity is created showing who was paged
- An incident context entry is added to the “Links and context” tab
Note
Incident API failures are logged but do not fail the escalation. The primary paging operation always succeeds first.
Escalate to a set of user(s) for an existing Alert Group
The following shows how you can escalate to a set of user(s) for an existing Alert Group.
curl "{{API_URL}}/api/v1/escalation/" \
--request POST \
--header "Authorization: meowmeowmeow" \
--header "Content-Type: application/json" \
--header "X-Grafana-URL: https://your-stack.grafana.net" \
--data '{
"alert_group_id": "IZMRNNY8RFS94",
"users": [
{
"id": "U281SN24AVVJX",
"important": false
},
{
"id": "U5AKCVNDEDUE7",
"important": true
}
]
}'The above command returns JSON structured in the following way:
{
"id": "IZHCC4GTNPZ93",
"integration_id": "CC3GZYZNIIEH5",
"route_id": "RDN8LITALJXCJ",
"alerts_count": 1,
"state": "firing",
"created_at": "2024-08-15T18:05:36.801215Z",
"resolved_at": null,
"resolved_by": null,
"acknowledged_at": null,
"acknowledged_by": null,
"title": "We're seeing a network outage in the datacenter",
"permalinks": {
"slack": null,
"slack_app": null,
"telegram": null,
"web": "http://<my_grafana_url>/a/grafana-irm-app/alert-groups/I5LAZ2MXGPUAH"
},
"silenced_at": null
}Parameters
Things to note
teamandteam_nameare mutually exclusive. Use one or the other to identify the team.idandusernameare mutually exclusive within each user object. Use one or the other to identify each user.team/team_nameandusersare mutually exclusive in the request payload. If you would like to escalate to a team AND user(s), first escalate to a team, then using the Alert Group ID returned in the response payload, add the required users to the existing Alert Groupalert_group_idis mutually exclusive withtitle,message,source_url, andincident_id. Practically speaking this means that if you are trying to escalate to a set of users on an existing Alert Group, you cannot update thetitle,message,source_url, or link to an incident for that Alert Group- If escalating to a set of users for an existing Alert Group, the Alert Group cannot be in a resolved state
- Regarding
important_team_escalation; this can be useful to send an “important” escalation to the specified team. Teams can configure their Direct Paging Integration to route to different escalation chains based on the value ofpayload.oncall.important. Refer to Manual paging integration - important escalations for more details.
HTTP request
POST {{API_URL}}/api/v1/escalation/



