Cloud
Jira Service Management ops / Reference / REST API

Routing rules

Postman Collection
OpenAPI
GET

List routing rulesExperimental

Lists all routing rules of given team. It optionally takes two parameters - offset and size.

Request

Path parameters

teamId

string

Required

Query parameters

offset

integer

size

integer

Responses

Returned if the request is successful.

application/json

RoutingRulesPaginatedResponse
GET/v1/teams/{teamId}/routing-rules
1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/teams/{teamId}/routing-rules' \ --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 { "values": [ { "id": "4292c912-12ac-4ac0-b195-9484fbb98c5c", "name": "My Primary Routing Rule", "isDefault": "true", "criteria": { "type": "match-any-condition", "conditions": [ { "field": "message", "operation": "matches", "expectedValue": "my critical alert" } ] }, "timezone": "Europe/Istanbul", "timeRestriction": { "type": "weekday-and-time-of-day", "restrictions": [ { "startDay": "monday", "endDay": "friday", "startHour": 13, "endHour": 18, "startMin": 0, "endMin": 0 } ] }, "order": 0, "notify": { "id": "d2acfc54-a145-451e-a963-ffbc089baea1", "type": "escalation" } } ], "links": { "next": "/v1/teams/77b933c9-92bb-46e7-a73c-764b8d7c3c25/routing-rules?offset=10&size=5" } }
POST

Create routing ruleExperimental

Creates a routing rule with the given properties.

Request

Path parameters

teamId

string

Required

Request bodyapplication/json

name

string

order

integer

criteria

oneOf [RoutingRulesMatchAllAnyConditionsFilter, RoutingRulesMatchAllFilter]

timeRestriction

oneOf [RoutingRulesTimeOfDayTimeRestrictionInterval, RoutingRulesWeekdayTimeRestrictionInterval]

notify

Notify

Required
timezone

string

Responses

Returned if the request is successful.

application/json

RoutingRuleResponse
POST/v1/teams/{teamId}/routing-rules
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 curl --request POST \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/teams/{teamId}/routing-rules' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "name": "My Empty Rule", "order": 1, "criteria": { "type": "match-all" }, "notify": { "type": "none" } }'
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 { "id": "4292c912-12ac-4ac0-b195-9484fbb98c5c", "name": "My Primary Routing Rule", "isDefault": "true", "criteria": { "type": "match-any-condition", "conditions": [ { "field": "message", "operation": "matches", "expectedValue": "my critical alert" } ] }, "timezone": "Europe/Istanbul", "timeRestriction": { "type": "weekday-and-time-of-day", "restrictions": [ { "startDay": "monday", "endDay": "friday", "startHour": 13, "endHour": 18, "startMin": 0, "endMin": 0 } ] }, "order": 0, "notify": { "id": "d2acfc54-a145-451e-a963-ffbc089baea1", "type": "escalation" } }
GET

Get routing ruleExperimental

Gets a routing rule with given id in the request.

Request

Path parameters

teamId

string

Required
id

string

Required

Responses

Returned if the request is successful.

application/json

RoutingRuleResponse
GET/v1/teams/{teamId}/routing-rules/{id}
1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/teams/{teamId}/routing-rules/{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 { "id": "4292c912-12ac-4ac0-b195-9484fbb98c5c", "name": "My Primary Routing Rule", "isDefault": "true", "criteria": { "type": "match-any-condition", "conditions": [ { "field": "message", "operation": "matches", "expectedValue": "my critical alert" } ] }, "timezone": "Europe/Istanbul", "timeRestriction": { "type": "weekday-and-time-of-day", "restrictions": [ { "startDay": "monday", "endDay": "friday", "startHour": 13, "endHour": 18, "startMin": 0, "endMin": 0 } ] }, "order": 0, "notify": { "id": "d2acfc54-a145-451e-a963-ffbc089baea1", "type": "escalation" } }
DEL

Delete routing ruleExperimental

Deletes a routing rule with given id in the request.

Request

Path parameters

teamId

string

Required
id

string

Required

Responses

Returned if the request is successful.

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

Update routing ruleExperimental

Updates a routing rule with given id in the request.

Request

Path parameters

teamId

string

Required
id

string

Required

Request bodyapplication/json

name

string

order

integer

criteria

oneOf [RoutingRulesMatchAllAnyConditionsFilter, RoutingRulesMatchAllFilter]

timeRestriction

oneOf [RoutingRulesTimeOfDayTimeRestrictionInterval, RoutingRulesWeekdayTimeRestrictionInterval]

notify

Notify

timezone

string

Responses

Returned if the request is successful.

application/json

RoutingRuleResponse
PATCH/v1/teams/{teamId}/routing-rules/{id}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 curl --request PATCH \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/teams/{teamId}/routing-rules/{id}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "name": "My Empty Rule", "order": 1, "criteria": { "type": "match-all" }, "notify": { "type": "none" } }'
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 { "id": "4292c912-12ac-4ac0-b195-9484fbb98c5c", "name": "My Primary Routing Rule", "isDefault": "true", "criteria": { "type": "match-any-condition", "conditions": [ { "field": "message", "operation": "matches", "expectedValue": "my critical alert" } ] }, "timezone": "Europe/Istanbul", "timeRestriction": { "type": "weekday-and-time-of-day", "restrictions": [ { "startDay": "monday", "endDay": "friday", "startHour": 13, "endHour": 18, "startMin": 0, "endMin": 0 } ] }, "order": 0, "notify": { "id": "d2acfc54-a145-451e-a963-ffbc089baea1", "type": "escalation" } }
PATCH

Change routing rule orderExperimental

Changes routing rule's order with given id in the request.

Request

Path parameters

teamId

string

Required
id

string

Required

Request bodyapplication/json

order

integer

Required

Responses

Returned if the request is successful.

PATCH/v1/teams/{teamId}/routing-rules/{id}/change-order
1 2 3 4 5 6 7 curl --request PATCH \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/teams/{teamId}/routing-rules/{id}/change-order' \ --user 'email@example.com:<api_token>' \ --header 'Content-Type: application/json' \ --data '{ "order": 2154 }'