Skip to content

Update an on-call schedule. A new time zone re-anchors the layers that follow it, so whoever is on call now stays on until their next handoff; layers that have started keep their past in the old zone as an ended version.

PUT
/on_call_schedule/{schedule_id}
curl --request PUT \
--url https://api.siteqwality.com/on_call_schedule/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "timezone": "example" }'
schedule_id
required
string format: uuid

On-call schedule identifier

Media type application/json
object
name
string | null
timezone
string | null
Example generated
{
"name": "example",
"timezone": "example"
}

Schedule updated

Media type application/json
object
id
required
string format: uuid
name
required
string
timezone
required
string
created_at
required
string format: date-time
layers
array | null
object
id
required
string format: uuid
schedule_id
required
string format: uuid
layer_number
required
integer format: int32
rotation_type
required
string
Allowed values: daily weekly custom
rotation_interval_days
integer | null format: int32
handoff_time
required
string
handoff_day

Weekly layers only: weekday of the handoff, 0 = Sunday .. 6 = Saturday, interpreted together with handoff_time in the schedule’s timezone.

integer | null format: int32
participants
required
Array<string>
effective_from
string | null format: date-time
effective_until
string | null format: date-time
created_at
required
string format: date-time
timezone

The layer’s own IANA zone for handoffs and restrictions; absent means the schedule’s.

string | null
restrictions
required

Windows the layer covers; empty means always.

Array<object>

A window a layer covers, repeated every day or every week in the layer’s zone. A window that runs past midnight (or past the end of the week) carries on into the next day.

object
type
required
string
Allowed values: daily weekly
start_day_of_week

Weekly only: the weekday the window opens, 0 = Sunday .. 6 = Saturday.

integer | null format: int32
start_time
required

HH:MM, 24-hour local time.

string
duration_minutes
required

1 to 1440 for daily windows, 1 to 10080 for weekly ones.

integer format: int32
rotation_anchor
One of:

Where the rotation is counted from: absent on layers created before anchors were stored.

object
date
required

YYYY-MM-DD in the layer’s zone.

string
start_index
required
integer format: int32
version

The current version’s number (1 until the layer is edited). Set by the edit and versions routes.

integer | null format: int32
version_started_at

When the current version took over. Set by the edit and versions routes.

string | null format: date-time
overrides
array | null
object
id
required
string format: uuid
schedule_id
required
string format: uuid
user_id
required
string format: uuid
start_at
required
string format: date-time
end_at
required
string format: date-time
created_at
required
string format: date-time
Example
{
"layers": [
{
"rotation_type": "daily",
"restrictions": [
{
"type": "daily"
}
]
}
]
}

Empty or overlong name, or a time zone that is not an IANA name

Missing or invalid authentication

Schedule not found

Internal server error