Caution
As of 2026-03-24, the Grafana OnCall OSS project is archived. The grafana/oncall repository is read-only, and active development continues in Grafana Cloud IRM. For a fully supported and actively maintained alternative, Grafana Cloud IRM offers a modern approach to incident response and on-call management.
Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Create an OnCall shift
curl "{{API_URL}}/api/v1/on_call_shifts/" \
--request POST \
--header "Authorization: meowmeowmeow" \
--header "Content-Type: application/json" \
--data '{
"name": "Demo single event",
"type": "single_event",
"team_id": null,
"time_zone": null,
"level": 0,
"start": "2020-09-10T08:00:00",
"duration": 10800,
"users": [
"U4DNY931HHJS5"
]
}'The above command returns JSON structured in the following way:
{
"id": "OH3V5FYQEYJ6M",
"name": "Demo single event",
"type": "single_event",
"team_id": null,
"time_zone": null,
"level": 0,
"start": "2020-09-10T08:00:00",
"duration": 10800,
"users": ["U4DNY931HHJS5"]
}Please see RFC 5545 for more information about recurrence rules.
HTTP request
POST {{API_URL}}/api/v1/on_call_shifts/
Get OnCall shifts
curl "{{API_URL}}/api/v1/on_call_shifts/OH3V5FYQEYJ6M/" \
--request GET \
--header "Authorization: meowmeowmeow" \
--header "Content-Type: application/json" \The above command returns JSON structured in the following way:
{
"id": "OH3V5FYQEYJ6M",
"name": "Demo single event",
"type": "single_event",
"team_id": null,
"time_zone": null,
"level": 0,
"start": "2020-09-10T08:00:00",
"duration": 10800,
"users": ["U4DNY931HHJS5"]
}HTTP request
GET {{API_URL}}/api/v1/on_call_shifts/<ON_CALL_SHIFT_ID>/
List OnCall shifts
curl "{{API_URL}}/api/v1/on_call_shifts/" \
--request GET \
--header "Authorization: meowmeowmeow" \
--header "Content-Type: application/json"The above command returns JSON structured in the following way:
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": "OH3V5FYQEYJ6M",
"name": "Demo single event",
"type": "single_event",
"team_id": null,
"time_zone": null,
"level": 0,
"start": "2020-09-10T08:00:00",
"duration": 10800,
"users": ["U4DNY931HHJS5"]
},
{
"id": "O9WTH7CKM3KZW",
"name": "Demo recurrent event",
"type": "recurrent_event",
"team_id": null,
"time_zone": null,
"level": 0,
"start": "2020-09-10T16:00:00",
"duration": 10800,
"frequency": "weekly",
"interval": 2,
"week_start": "SU",
"by_day": ["MO", "WE", "FR"],
"by_month": null,
"by_monthday": null,
"users": ["U4DNY931HHJS5"]
}
]
}The following available filter parameters should be provided as GET arguments:
name(Exact match)schedule_id(Exact match)
HTTP request
GET {{API_URL}}/api/v1/on_call_shifts/
Update OnCall shift
curl "{{API_URL}}/api/v1/on_call_shifts/OH3V5FYQEYJ6M/" \
--request PUT \
--header "Authorization: meowmeowmeow" \
--header "Content-Type: application/json" \
--data '{
"name": "Demo single event",
"type": "single_event",
"level": 0,
"start": "2020-09-10T08:00:00",
"duration": 10800,
"users": [
"U4DNY931HHJS5"
]
}'The above command returns JSON structured in the following way:
{
"id": "OH3V5FYQEYJ6M",
"name": "Demo single event",
"type": "single_event",
"team_id": null,
"time_zone": null,
"level": 0,
"start": "2020-09-10T08:00:00",
"duration": 10800,
"users": ["U4DNY931HHJS5"]
}HTTP request
PUT {{API_URL}}/api/v1/on_call_shifts/<ON_CALL_SHIFT_ID>/
Delete OnCall shift
curl "{{API_URL}}/api/v1/on_call_shifts/OH3V5FYQEYJ6M/" \
--request DELETE \
--header "Authorization: meowmeowmeow" \
--header "Content-Type: application/json"HTTP request
DELETE {{API_URL}}/api/v1/on_call_shifts/<ON_CALL_SHIFT_ID>/