Cloud
Jira Service Management ops / Reference / REST API

Schedule rotations

Postman Collection
OpenAPI

This resource represents on-call schedule rotations in Jira Service Management. Use it to:

  • list all rotations of a schedule.
  • create a new rotation.
  • get a rotation.
  • update a rotation.
  • delete a rotation.
GET

List rotationsExperimental

Lists all rotations of the schedule with given id in the request. It optionally takes two parameters - offset and size.

Permissions required: Permission to access to the schedule:

  • the user has read-only administrative right.
  • the schedule's assigned team is one of the teams that the user belongs to.
  • the user is added to a rotation of the schedule as a responder.
  • a team is added to a rotation of the schedule as a responder, and the user is a member of this team.
  • an escalation is added to a rotation of the schedule as a responder, and the user is a member of this escalation.
  • there is an override to the user in the schedule.

Request

Path parameters

scheduleId

string

Required

Query parameters

size

integer

offset

integer

Responses

Returned if the request is successful.

application/json

ListRotationsResponse
GET/v1/schedules/{scheduleId}/rotations
1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/schedules/{scheduleId}/rotations' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 { "values": [ { "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, "endMin": 0 } } } ], "links": { "next": "/v1/schedules/f8f2a4ec-54b2-4513-865b-8cb3b81c9544/rotations?offset=50&size=25" } }
POST

Create rotationExperimental

Creates a new rotation for the schedule with given id and properties.

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.

Request

Path parameters

scheduleId

string

Required

Request bodyapplication/json

name

string

startDate

string

Required
endDate

string

type

string

Required
length

integer

participants

array<ResponderInfo>

timeRestriction

oneOf [TimeOfDayTimeRestrictionRequest, WeekdayTimeRestrictionRequest]

Responses

Returned if the rotation is created successfully.

application/json

Rotation
POST/v1/schedules/{scheduleId}/rotations
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 curl --request POST \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/schedules/{scheduleId}/rotations' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "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, "endMin": 0 } } }'
201Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 { "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, "endMin": 0 } } }
GET

Get rotationExperimental

Returns the details of the rotation of a schedule with given IDs in the request.

Permissions required: Permission to access to the schedule:

  • the user has read-only administrative right.
  • the schedule's assigned team is one of the teams that the user belongs to.
  • the user is added to a rotation of the schedule as a responder.
  • a team is added to a rotation of the schedule as a responder, and the user is a member of this team.
  • an escalation is added to a rotation of the schedule as a responder, and the user is a member of this escalation.
  • there is an override to the user in the schedule.

Request

Path parameters

scheduleId

string

Required
id

string

Required

Responses

Returned if the request is successful.

application/json

Rotation
GET/v1/schedules/{scheduleId}/rotations/{id}
1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/schedules/{scheduleId}/rotations/{id}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 { "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, "endMin": 0 } } }
DEL

Delete rotationExperimental

Deletes the rotation of a schedule with given IDs in the request.

Permissions required: Permission to delete the rotation:

  • the user has delete configuration right.
  • the user is the admin of the team that rotation's schedule belongs to.

Request

Path parameters

scheduleId

string

Required
id

string

Required

Responses

Returned if the rotation is deleted successfully.

DEL/v1/schedules/{scheduleId}/rotations/{id}
1 2 3 curl --request DELETE \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/schedules/{scheduleId}/rotations/{id}' \ --user 'email@example.com:<api_token>'
PATCH

Update rotationExperimental

Updates the rotation of a schedule with given IDs in the request.

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.

Request

Path parameters

scheduleId

string

Required
id

string

Required

Request bodyapplication/json

name

string

startDate

string

endDate

string

type

string

length

integer

participants

array<ResponderInfo>

timeRestriction

oneOf [TimeOfDayTimeRestrictionRequest, WeekdayTimeRestrictionRequest]

Responses

Returned if the request is successful.

application/json

Rotation
PATCH/v1/schedules/{scheduleId}/rotations/{id}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 curl --request PATCH \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/schedules/{scheduleId}/rotations/{id}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "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, "endMin": 0 } } }'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 { "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, "endMin": 0 } } }

Rate this page: