Create Schedule Rotation

Create a specific schedule rotation in Opsgenie.

Note

Make sure that the API key that's used to create the Opsgenie connection for this card is not team-specific. Otherwise, any input value in the Team ID or Team Name fields on this card will not override the team that's specified by a team-specific API key. It is recommended to create and manage API keys on the Opsgenie API key management page.

Options

Field Definition Type Required
Schedule Identifier Type of schedule identifier for the team. Choose one of the following options:
  • Schedule ID: Unique ID of the schedule.
  • Schedule Name: Name of the schedule.

Dropdown

TRUE

Add Time Restrictions? Specify if time restriction is added. Choose one of the following options:
  • No: No added time restriction.
  • Time Only: Limit schedule rotation to a time of the week.
  • >Day and Time: Limit schedule rotation based on a certain day and time of the week.

Dropdown

TRUE

Input

These fields are dynamically generated based on the fields selected in Options.

Field Definition Type Required

Rotation

Time Restrictions Used to limit schedule rotation to a certain day and time of the week, using multiple start and end times for each day of the week. This allows for applying different scheduling rotations at different times.

If Time Only is selected for Add Time Restrictions? options, the following options are available. Hours are rounded down, and minutes are rounded to the closest 00/30.

  • startHour: 0 to 23
  • startMinute: 00 or 30
  • endHour: 0 to 23
  • endMinute: 00 or 30

For example:

Copy
{
"startHour": 5
"startMin": 30
"endHour": 16
"endMin": 0
}

If Day and Time is selected for Add Time Restrictions? options, the following options are available. Both day and time options are required.

  • startDay: monday to sunday
  • startHour: 0 to 23
  • startMinute: 00 or 30
  • endDay: monday to sunday
  • endHour: 0 to 23
  • endMinute: 00 or 30

For example:

Copy
[
{
"startDay":"monday",
"endDay":"tuesday",
"startHour":8,
"endHour":18,
"startMin":0,
"endMin":30
},
{
"startDay":"thursday",
"endDay":"sunday",
"startHour":6,
"endHour":8,
"startMin":0,
"endMin":30
}
]

Object

TRUE

Schedule ID Unique ID of the schedule.

This field displays when Schedule ID is selected from the Schedule Identifier option.

Text

TRUE

Schedule Name Name of the schedule.

This field displays when Schedule Name is selected from the Schedule Identifier option.

Text

TRUE

Name Name of the new schedule rotation.

Text

FALSE

Start Date Start date of the rotation. Date format as yyyy-MM-dd'T'HH:mm:ssZ (for example, 2017-01-15T08:00:00+02:00). Minutes may take 0 or 30 as value. Otherwise they will be converted to nearest 0 or 30 automatically.

Date & Time

TRUE

End Date End date of the rotation. Date format as yyyy-MM-dd'T'HH:mm:ssZ (for example, 2017-01-15T08:00:00+02:00) Minutes may take 0 or 30 as value. Otherwise they will be converted to nearest 0 or 30 automatically.

Date & Time

FALSE

Type

Duration of rotation. Choose one of the following options:

  • Hourly

  • Daily

  • Weekly

Dropdown

TRUE

Length Length of the rotation. Default value is 1.

Number

FALSE

Participants List of escalations, teams, users or none which are used in a schedule. Each of them can be used multiple times and will be rotated in the order they are given.

For user and team, optionally define ID or username properties.

For example:

Copy
[
{
"type":"escalation",
"id":"3f145401-e6f3-428f-9f3c-41b0e1d172d5",
"name":"Team 2_escalation"
},
{
"type":"user",
"id":"d92b2aa1-4bc8-481b-a30e-4f19e5a27f83",
"username":"johnathan.doe@okta.com"
},
{
"type":"team",
"id":"d00f95c1-2cce-4110-adbc-2ceca786c305",
"username":"lily.doe@okta.com"
},
{
"type":"none"
}
]
Array of Objects

FALSE

Output

Field Definition Type
Status Code

Result of the operation. The connector returns an HTTP status code that indicates whether the action taken by the card succeeded or failed. For example:

  • A 201 Created status code indicates success where a new resource was created.
  • A 403 Forbidden error indicates that the HTTP request wasn't processed because the necessary permissions were missing.

For a full list of possible status codes, see HTTP status codes.

Number

Result Result of the API call.

For example, Deleted.

Text

Rotation ID Name of the new schedule rotation.

Text

Name Name of the new schedule rotation.

Text

Related topics

Opsgenie connector

Workflow elements

Opsgenie API overview