List all existing on-call calendars

List all on-call calendars.

GET https://betteruptime.com/api/v2/on-calls

Headers

Authorization
required string
200

Response body

{
  "data": [
    {
      "id": "12345",
      "type": "on_call_calendar",
      "attributes": {
        "name": null,
        "default_calendar": true
      },
      "relationships": {
        "on_call_users": {
          "data": [
            {
              "id": "2345",
              "type": "user"
            }
          ]
        }
      }
    },
    {
      "id": "12346",
      "type": "on_call_calendar",
      "attributes": {
        "name": "Tier 2",
        "default_calendar": false
      },
      "relationships": {
        "on_call_users": {
          "data": [
            {
              "id": "2345",
              "type": "user"
            }
          ]
        }
      }
    }
  ],
  "included": [
    {
      "id": "2345",
      "type": "user",
      "attributes": {
        "first_name": "Tomas",
        "last_name": "Hromada",
        "email": "[email protected]",
        "phone_numbers": [
          "+420737123456"
        ]
      }
    }
  ],
  "pagination": {
    "first": "https://betteruptime.com/api/v2/on-calls?page=1",
    "last": "https://betteruptime.com/api/v2/on-calls?page=1",
    "prev": null,
    "next": null
  }
}

Example cURL

curl --request GET \
  --url "https://betteruptime.com/api/v2/on-calls" \
  --header 'authorization: Bearer YOUR_API_TOKEN'
Copied!