---
title: "List shifts"
method: GET
path: "/api/v1/schedules/{schedule}/shifts"
tags: ["On-call schedules"]
---

# List shifts

`GET /api/v1/schedules/{schedule}/shifts`

## Request

- Base URL: `https://wardenpoint.com` (the document declares no server; this is the origin it was published from)
- URL: `https://wardenpoint.com/api/v1/schedules/{schedule}/shifts`
- Auth: API key in header `X-API-Key`

The rotation as laid out in time, oldest first. Without a window this returns what is still ahead — shifts that have not ended yet — because that is the question worth asking; a year of past rotation is rarely wanted and never wanted whole. Handovers are NOT folded in here: a shift row says what the rotation planned, and GET /api/v1/schedules/{schedule}/overrides says what temporarily replaces it. For the resolved answer at one instant use /on-call.

## Path parameters

- `schedule` string, uuid, required

## Query parameters

- `role` 'primary' | 'secondary' | 'manager'
- `from` string, date-time
- `to` string, date-time
- `per_page` integer

## Response `200`

A page of shifts. Alongside `data` the body carries the usual pagination fields (current_page, last_page, per_page, total).

- object
  - `data` ScheduleShift[]
    - `uuid` string, uuid
    - `role` 'primary' | 'secondary' | 'manager'
    - `recipient` object, nullable: Null only if the person was deleted after the shift was generated.
      - `uuid` string, uuid
      - `name` string
    - `starts_at` string, date-time
    - `ends_at` string, date-time
    - `source` 'rotation' | 'manual': `rotation` — generated, and the next generation covering the same window will replace it. `manual` — created by hand and survives regeneration.
  - `current_page` integer
  - `last_page` integer
  - `per_page` integer
  - `total` integer

## Other responses

- `401`: API key missing, invalid, revoked or expired.
- `403`: API key lacks the config.read ability, or the schedule belongs to another company.
- `404`: No schedule with this UUID, or on-call schedules are switched off for this deployment.
- `422`: `from` or `to` is not a date or carries no UTC offset, `to` is not after `from`, or `role` is not one of the three slots.

---

[API](https://skmtc.dev/wardenpoint/apis/wardenpoint-api.md) · [All operations](https://skmtc.dev/wardenpoint/apis/wardenpoint-api/llms.txt) · [OpenAPI document](https://skmtc.dev/wardenpoint/apis/wardenpoint-api/revisions/259ee445728e?raw)
