Schedules

Create schedule

Creates a schedule with given properties.<br> <br> 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.
post/api/{cloudId}/v1/schedules

Request

  • Base URL
    https://api.atlassian.com/jsm/ops
  • URL
    https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/schedules
  • Auth
    • HTTP basic
    • or OAuth 2
      Authorization code: https://auth.stg.atlassian.com/authorize
      Token URL: https://auth.stg.atlassian.com/oauth/token scopes: read:ops-config:jira-service-management, write:ops-config:jira-service-management

Request body

namestring required

Name of the schedule. Cannot be empty.

teamIdstring

ID of the team that schedule belongs to.

descriptionstring

Description of the schedule.

timezonestring

Time zone ID of the schedule.

enabledboolean

Indicates whether the schedule is enabled or not.

Example request

{
  "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
        }
      }
    }
  ]
}

Response

Returned if the schedule is created successfully.

idstring

ID of the schedule.

namestring

Name of the schedule.

descriptionstring

Description of the schedule.

timezonestring

Time zone ID of the schedule.

enabledboolean

Indicates whether the schedule is enabled or not.

teamIdstring

ID of the team that schedule belongs to.

Example response

{
  "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
        }
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 5 revisions of this API.