List on-call schedules

List all on-call schedules.

GET https://incidents.betterstack.com/api/v2/on-calls

Query parameters

team_name
string
page
integer
per_page
integer

Headers

Authorization
required string
200

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",
                "on_holiday": false,
                "holiday_ends_at": null
              }
            }
          ]
        }
      }
    },
    {
      "id": "12346",
      "type": "on_call_calendar",
      "attributes": {
        "name": "Tier 2",
        "default_calendar": false,
        "team_name": "Production"
      },
      "relationships": {
        "on_call_users": {
          "data": [
            {
              "id": "2345",
              "type": "user",
              "meta": {
                "email": "tomas@betterstack.com",
                "on_holiday": false,
                "holiday_ends_at": null
              }
            }
          ]
        }
      }
    }
  ],
  "included": [
    {
      "id": "2345",
      "type": "user",
      "attributes": {
        "first_name": "Tomas",
        "last_name": "Hromada",
        "email": "tomas@betterstack.com",
        "phone_numbers": [
          "+420737123456"
        ]
      }
    }
  ],
  "pagination": {
    "first": "https://incidents.betterstack.com/api/v2/on-calls?page=1",
    "last": "https://incidents.betterstack.com/api/v2/on-calls?page=1",
    "prev": null,
    "next": null
  }
}

Response attributes

id
string
type
string
attributes.name
string or null
attributes.default_calendar
boolean
attributes.team_name
string
relationships.on_call_users.data
array
relationships.on_call_users.data[].id
string
relationships.on_call_users.data[].type
string
relationships.on_call_users.data[].meta.email
string
relationships.on_call_users.data[].meta.on_holiday
boolean
relationships.on_call_users.data[].meta.holiday_ends_at
string or null
included
array
included[].id
string
included[].type
string
included[].attributes.first_name
string or null
included[].attributes.last_name
string or null
included[].attributes.email
string
included[].attributes.phone_numbers
array
pagination.first
string
pagination.last
string
pagination.prev
string or null
pagination.next
string or null

Example cURL

Example
curl --request GET \
  --url "https://incidents.betterstack.com/api/v2/on-calls" \
  --header 'authorization: Bearer $TOKEN'