POST
/
v1
/
schedules
/
{schedule_id}
/
schedule_rotations
curl --request POST \
  --url https://api.rootly.com/v1/schedules/%7Bschedule_id%7D/schedule_rotations \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'content-type: application/vnd.api+json'
{
  "data": {
    "id": "bb14b917-62f4-478d-a193-9284241e7089",
    "type": "schedule_rotations",
    "attributes": {
      "schedule_id": "813d7c42-8933-4c6f-9786-24ca99773a11",
      "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",
      "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"
        }
      ]
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

schedule_id
string
required

Body

application/vnd.api+json
data
object
required

Response

201
application/vnd.api+json
schedule_rotation created with custom active times
data
object
required