Who a schedule has on call at an instant (default now), until when, and who is next.
GET
/on_call_schedule/{schedule_id}/on_call
const url = 'https://api.siteqwality.com/on_call_schedule/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/on_call';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/on_call \ --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 ” at
string
RFC 3339 instant; defaults to now
Responses
Section titled “ Responses ”The shift covering at (a gap has no user_id) and the next one
Media type application/json
Who a schedule has on call at at, until when, and who comes next.
object
schedule_id
required
string format: uuid
at
required
string format: date-time
timezone
required
string
on_call
required
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
next
One of:
The shift that starts when on_call ends; absent when that is beyond 90 days.
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
null
Example
{ "on_call": { "source": "override" }, "next": { "source": "override" }}at is not an RFC 3339 timestamp
Missing or invalid authentication
On-call schedule not found
Internal server error