v3

latestOpenAPI 3.0.12026-07-31240345599.7 KB
Schedule rotations

Update rotation

Updates the rotation of a schedule with given IDs in the request. <br> <br> Permissions required: Permission to edit a schedule:

  • the user has edit configuration right.
  • the user is the admin of the team that the schedule belongs to.
patch/api/{cloudId}/v1/schedules/{scheduleId}/rotations/{id}

Path parameters

scheduleIdstring required

ID of the schedule.

idstring required

ID of the rotation.

Request body

namestring

Name of the rotation.

startDatestring date-time

Start time of the rotation.

endDatestring date-time

End time of the rotation.

type'daily' | 'weekly' | 'hourly'

Type of the rotation.

lengthinteger

Length of the rotation based on type.

Example request

{
  "name": "Daily rotation",
  "startDate": "2023-11-10T05:00:00Z",
  "endDate": "2024-04-28T10:00:00Z",
  "type": "weekly",
  "length": 2,
  "participants": [
    {
      "type": "user",
      "id": "14a994fd-78c6-4236-8b83-d107e5d32d6a"
    },
    {
      "type": "team",
      "id": "2ad4505d-d7a9-4997-8745-c40a3b641573"
    }
  ],
  "timeRestriction": {
    "type": "time-of-day",
    "restriction": {
      "startHour": 10,
      "endHour": 20,
      "startMin": 30
    }
  }
}

Response

Returned if the request is successful.

idstring

ID of the rotation.

namestring

Name of the rotation.

startDatestring date-time

Start time of the rotation.

endDatestring date-time

End time of the rotation.

type'daily' | 'weekly' | 'hourly'

Type of the rotation.

lengthinteger

Length of the rotation based on type.

Example response

{
  "id": "3ce33f53-69be-4b92-8d34-a1df0efe642e",
  "name": "Daily rotation",
  "startDate": "2023-11-10T05:00:00Z",
  "endDate": "2024-04-28T10:00:00Z",
  "type": "weekly",
  "length": 2,
  "participants": [
    {
      "type": "user",
      "id": "14a994fd-78c6-4236-8b83-d107e5d32d6a"
    },
    {
      "type": "team",
      "id": "2ad4505d-d7a9-4997-8745-c40a3b641573"
    }
  ],
  "timeRestriction": {
    "type": "time-of-day",
    "restriction": {
      "startHour": 10,
      "endHour": 20,
      "startMin": 30
    }
  }
}