# List on-call schedule events

List events of a single on-call schedule. This endpoint does not support [pagination](https://betterstack.com/docs/uptime/api/pagination/) and returns all events instead.

[endpoint]
base_url = "https://uptime.betterstack.com"
path = "/api/v2/on-calls/{schedule_id}/events"
method = "GET"

[[path_param]]
name = "schedule_id"
description = "The ID of the on-call schedule you want to get events for. Use `default` to refer to the default on-call schedule for the team."
required = true
type = "string"

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"
[/endpoint]

[responses]
[[response]]
status = 200
description = '''Returns a list of events for the given on-call schedule.'''
body = '''{
  "events": [
    {
      "id": 12345,
      "users": ["tomas@betterstack.com"],
      "starts_at": "2024-09-04T22:00:00Z",
      "ends_at": "2024-09-05T22:00:00Z",
      "override": false
    },
    {
      "id": 23456,
      "users": ["simon@betterstack.com"],
      "starts_at": "2024-09-05T22:00:00Z",
      "ends_at": "2024-09-06T22:00:00Z",
      "override": false
    },
    {
      "id": 34567,
      "users": ["tomas@betterstack.com"],
      "starts_at": "2024-09-06T22:00:00Z",
      "ends_at": "2024-09-07T22:00:00Z",
      "override": true
    }
  ]
}'''

[/responses]

#### Example cURL

```shell
[label Example]
curl --request GET \
  --url "https://uptime.betterstack.com/api/v2/on-calls/default/events" \
  --header "Authorization: Bearer $TOKEN"
```
