Creates a new schedule rotation from provided data
curl --request POST \
--url https://api.rootly.com/v1/schedules/{schedule_id}/schedule_rotations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '{
"data": {
"type": "schedule_rotations",
"attributes": {
"name": "<string>",
"position": 123,
"schedule_rotationable_type": "ScheduleDailyRotation",
"active_all_week": true,
"active_days": [
"S"
],
"active_time_type": "<string>",
"active_time_attributes": [
{
"start_time": "<string>",
"end_time": "<string>"
}
],
"time_zone": "Etc/UTC",
"schedule_rotationable_attributes": {
"handoff_time": "<string>"
},
"start_time": "2023-12-25",
"end_time": "2023-12-25"
}
}
}'
{
"data": {
"id": "3e6b2a8d-86e2-40cd-9f1a-49e882d65da5",
"type": "schedule_rotations",
"attributes": {
"schedule_id": "693b69f7-eeab-43ee-b589-0bae7e3c4a83",
"name": "Schedule Rotation Name",
"position": 1,
"schedule_rotationable_type": "ScheduleWeeklyRotation",
"active_all_week": false,
"active_days": [
"M",
"T"
],
"active_time_type": "same_time",
"time_zone": "American Samoa",
"start_time": null,
"end_time": null,
"schedule_rotationable_attributes": {
"handoff_time": "21:30",
"handoff_day": "T"
},
"active_time_attributes": [
{
"start_time": "07:30",
"end_time": "16:30"
},
{
"start_time": "17:00",
"end_time": "21:00"
}
]
}
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
schedule_rotation created with custom active times
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://api.rootly.com/v1/schedules/{schedule_id}/schedule_rotations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '{
"data": {
"type": "schedule_rotations",
"attributes": {
"name": "<string>",
"position": 123,
"schedule_rotationable_type": "ScheduleDailyRotation",
"active_all_week": true,
"active_days": [
"S"
],
"active_time_type": "<string>",
"active_time_attributes": [
{
"start_time": "<string>",
"end_time": "<string>"
}
],
"time_zone": "Etc/UTC",
"schedule_rotationable_attributes": {
"handoff_time": "<string>"
},
"start_time": "2023-12-25",
"end_time": "2023-12-25"
}
}
}'
{
"data": {
"id": "3e6b2a8d-86e2-40cd-9f1a-49e882d65da5",
"type": "schedule_rotations",
"attributes": {
"schedule_id": "693b69f7-eeab-43ee-b589-0bae7e3c4a83",
"name": "Schedule Rotation Name",
"position": 1,
"schedule_rotationable_type": "ScheduleWeeklyRotation",
"active_all_week": false,
"active_days": [
"M",
"T"
],
"active_time_type": "same_time",
"time_zone": "American Samoa",
"start_time": null,
"end_time": null,
"schedule_rotationable_attributes": {
"handoff_time": "21:30",
"handoff_day": "T"
},
"active_time_attributes": [
{
"start_time": "07:30",
"end_time": "16:30"
},
{
"start_time": "17:00",
"end_time": "21:00"
}
]
}
}
}