A schedule's final timeline: consecutive shifts from `since` (default now) to `until` (default 14 days later, at most 90), overrides applied and gaps included.
GET
/on_call_schedule/{schedule_id}/shifts
const url = 'https://api.siteqwality.com/on_call_schedule/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/shifts';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.siteqwality.com/on_call_schedule/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/shifts \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” schedule_id
required
string format: uuid
On-call schedule identifier
Query Parameters
Section titled “Query Parameters ” since
string
RFC 3339 start; defaults to now
until
string
RFC 3339 end; defaults to 14 days after since, at most 90 days after it
Responses
Section titled “ Responses ”Shifts covering the range; the first may start before since and the last may end after until
Media type application/json
A schedule’s final timeline over a range, gaps included.
object
schedule_id
required
string format: uuid
since
required
string format: date-time
until
required
string format: date-time
timezone
required
string
shifts
required
Array<object>
A stretch of a schedule with one answer. starts_at or ends_at is absent when the stretch
runs more than 90 days past the instant or range asked about.
object
user_id
Who is on call; absent in a gap.
string | null format: uuid
source
required
Why someone is on call, or gap when nobody is.
string
layer_id
string | null format: uuid
layer_number
integer | null format: int32
override_id
string | null format: uuid
starts_at
string | null format: date-time
ends_at
string | null format: date-time
Example
{ "shifts": [ { "source": "override" } ]}Bad timestamp, until before since, or a range over 90 days
Missing or invalid authentication
On-call schedule not found
Internal server error