GET
https://uptime.betterstack.com/api/v2/on-calls
Headers
Authorization
required
string
Bearer $TOKEN
List all on-call calendars. This endpoint supports pagination.
Headers
Bearer $TOKEN
Returns the list of existing on-call calendars including their current on-calls
Response body
{
"data": [
{
"id": "12345",
"type": "on_call_calendar",
"attributes": {
"name": null,
"default_calendar": true,
"team_name": "Production"
},
"relationships": {
"on_call_users": {
"data": [
{
"id": "2345",
"type": "user",
"meta": {
"email": "tomas@betterstack.com"
}
}
]
}
}
},
{
"id": "12346",
"type": "on_call_calendar",
"attributes": {
"name": "Tier 2",
"default_calendar": false
},
"relationships": {
"on_call_users": {
"data": [
{
"id": "2345",
"type": "user",
"meta": {
"email": "tomas@betterstack.com"
}
}
]
}
}
}
],
"included": [
{
"id": "2345",
"type": "user",
"attributes": {
"first_name": "Tomas",
"last_name": "Hromada",
"email": "tomas@betterstack.com",
"phone_numbers": [
"+420737123456"
]
}
}
],
"pagination": {
"first": "https://uptime.betterstack.com/api/v2/on-calls?page=1",
"last": "https://uptime.betterstack.com/api/v2/on-calls?page=1",
"prev": null,
"next": null
}
}
curl --request GET \
--url "https://uptime.betterstack.com/api/v2/on-calls" \
--header 'authorization: Bearer $TOKEN'