POST
/
v1
/
schedules
/
{schedule_id}
/
schedule_rotations
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>"
      }
    }
  }
}'
{
  "data": {
    "id": "9fbeb50f-9878-4ffd-be27-833a56e80f30",
    "type": "schedule_rotations",
    "attributes": {
      "schedule_id": "292d095e-015a-4b42-add1-a20224739742",
      "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