Cloud
Jira Service Management ops / Reference / REST API

Schedules

Postman Collection
OpenAPI

This resource represents schedules in Jira Service Management. Use it to:

  • create a new schedule.
  • list all schedules.
  • get a schedule.
  • update a schedule.
  • delete a schedule.
GET

List schedulesExperimental

Lists all schedules that user can view. It optionally takes two parameters - offset and size.

Permissions required: Permission to access Jira Service Management; however, the list contains a schedule if:

  • 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

Query parameters

query

string

size

integer

offset

integer

expand

array<string>

Responses

Returned if the request is successful.

application/json

ListSchedulesResponse
GET/v1/schedules
1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/schedules' \ --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 35 36 37 38 39 40 41 42 { "values": [ { "id": "f8f2a4ec-54b2-4513-865b-8cb3b81c9544", "name": "Support Schedule", "description": "On-call schedule for support team", "timezone": "America/New_York", "enabled": true, "teamId": "cd68207b-c55d-4611-ab25-72fd0c439e9f", "rotations": [ { "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": {} } } ] } ], "links": { "next": "/v1/schedules?offset=50&size=25" }, "_expands": [ "rotation" ] }
POST

Create scheduleExperimental

Creates a schedule with given properties.

Permissions required: Permission to create a schedule:

  • the user has edit configuration right.
  • the user is the admin of the team that the schedule belongs to.

Request

Request bodyapplication/json

name

string

Required
teamId

string

Required
description

string

timezone

string

enabled

boolean

rotations

array<CreateRotationRequest>

Responses

Returned if the schedule is created successfully.

application/json

Schedule
POST/v1/schedules
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 35 36 37 38 39 40 curl --request POST \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/schedules' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "name": "Support Schedule", "teamId": "cd68207b-c55d-4611-ab25-72fd0c439e9f", "description": "On-call schedule for support team", "timezone": "America/New_York", "enabled": true, "rotations": [ { "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 28 29 30 31 32 33 34 35 36 37 { "id": "f8f2a4ec-54b2-4513-865b-8cb3b81c9544", "name": "Support Schedule", "description": "On-call schedule for support team", "timezone": "America/New_York", "enabled": true, "teamId": "cd68207b-c55d-4611-ab25-72fd0c439e9f", "rotations": [ { "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 scheduleExperimental

Returns the details of the schedule with given id 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

id

string

Required

Responses

Returned if the request is successful.

application/json

Schedule
GET/v1/schedules/{id}
1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/schedules/{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 28 29 30 31 32 33 34 35 36 37 { "id": "f8f2a4ec-54b2-4513-865b-8cb3b81c9544", "name": "Support Schedule", "description": "On-call schedule for support team", "timezone": "America/New_York", "enabled": true, "teamId": "cd68207b-c55d-4611-ab25-72fd0c439e9f", "rotations": [ { "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 scheduleExperimental

Deletes the schedule with given id in the request.

Permissions required: Permission to delete the schedule:

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

Request

Path parameters

id

string

Required

Responses

Returned if the schedule is deleted successfully.

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

Update scheduleExperimental

Updates the schedule with given id in the request.

Permissions required: Permission to update the schedule:

  • the user has edit configuration right.
  • the user is the admin of the team that the schedule belongs to.

Request

Path parameters

id

string

Required

Request bodyapplication/json

name

string

teamId

string

description

string

timezone

string

enabled

boolean

rotations

array<CreateRotationRequest>

Responses

Returned if the request is successful.

application/json

Schedule
PATCH/v1/schedules/{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 32 33 34 35 36 37 38 39 40 curl --request PATCH \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/schedules/{id}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "name": "Support Schedule", "teamId": "cd68207b-c55d-4611-ab25-72fd0c439e9f", "description": "On-call schedule for support team", "timezone": "America/New_York", "enabled": true, "rotations": [ { "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 28 29 30 31 32 33 34 35 36 37 { "id": "f8f2a4ec-54b2-4513-865b-8cb3b81c9544", "name": "Support Schedule", "description": "On-call schedule for support team", "timezone": "America/New_York", "enabled": true, "teamId": "cd68207b-c55d-4611-ab25-72fd0c439e9f", "rotations": [ { "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 } } } ] }