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.
const url = 'https://api.siteqwality.com/on_call_schedule/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","timezone":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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" }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”On-call schedule identifier
Request Body required
Section titled “Request Body required ”object
Example generated
{ "name": "example", "timezone": "example"}Responses
Section titled “ Responses ”Schedule updated
object
object
Weekly layers only: weekday of the handoff, 0 = Sunday .. 6 = Saturday,
interpreted together with handoff_time in the schedule’s timezone.
The layer’s own IANA zone for handoffs and restrictions; absent means the schedule’s.
Windows the layer covers; empty means always.
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
Weekly only: the weekday the window opens, 0 = Sunday .. 6 = Saturday.
HH:MM, 24-hour local time.
1 to 1440 for daily windows, 1 to 10080 for weekly ones.
The current version’s number (1 until the layer is edited). Set by the edit and versions routes.
When the current version took over. Set by the edit and versions routes.
object
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