Cloud
Jira Service Management ops / Reference / REST API

Notification rules

Postman Collection
OpenAPI

Notification rules allow users to configure notification steps that use their existing contact methods and define conditions & time constraints on them. This resource represents the contract to create/get/update/delete/list of notification-rules in Jira Service Management.

GET

List notification rulesExperimental

Lists all notification rules for the user. It optionally takes two parameters - offset and size.

read:ops-config:jira-service-management

Request

Query parameters

offset

integer

size

integer

Responses

Returned if the request is successful.

application/json

NotificationRulesPaginatedResponse
GET/v1/notification-rules
1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/notification-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 42 43 44 45 { "values": [ { "id": "4292c912-12ac-4ac0-b195-9484fbb98c5c", "name": "Create Alert", "actionType": "create-alert", "criteria": { "type": "match-all" }, "timeRestriction": { "type": "weekday-and-time-of-day", "restrictions": [ { "startDay": "monday", "endDay": "friday", "startHour": 13, "endHour": 18, "startMin": 0, "endMin": 0 } ] }, "order": 1, "steps": [ { "id": "0hcb717e-c442-4185-8bc1-cc998844f567", "sendAfter": 0, "contact": { "method": "email", "to": "test@atlassian.com" }, "enabled": true } ], "repeat": { "loopAfter": 1, "enabled": true }, "enabled": true } ], "links": { "next": "/v1/notification-rules?offset=10&size=5" } }
POST

Create notification ruleExperimental

Creates a notification rule with the given properties for the user.

read:ops-config:jira-service-management
,
write:ops-config:jira-service-management

Request

Request bodyapplication/json

name

string

Required
actionType

string

Required
criteria

oneOf [NotificationRulesMatchAllAnyConditionsFilter, NotificationRulesMatchAllFilter]

notificationTime

array<string>

timeRestriction

oneOf [NotificationRulesTimeOfDayTimeRestrictionInterval, NotificationRulesWeekdayTimeRestrictionInterval]

schedules

array<string>

order

integer

steps

array<NotificationRulesCreateNotificationRuleStepRequest>

repeat

NotificationRuleRepeat

enabled

boolean

Required

Responses

Returned if the request is successful.

application/json

NotificationRuleResponse
POST/v1/notification-rules
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 curl --request POST \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/notification-rules' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "name": "Create Alert", "actionType": "create-alert", "criteria": { "type": "match-all" }, "steps": [ { "id": "0hcb717e-c442-4185-8bc1-cc998844f567", "sendAfter": 0, "contact": { "method": "email", "to": "test@atlassian.com" }, "enabled": true } ], "enabled": true }'
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 38 { "id": "4292c912-12ac-4ac0-b195-9484fbb98c5c", "name": "Create Alert", "actionType": "create-alert", "criteria": { "type": "match-all" }, "timeRestriction": { "type": "weekday-and-time-of-day", "restrictions": [ { "startDay": "monday", "endDay": "friday", "startHour": 13, "endHour": 18, "startMin": 0, "endMin": 0 } ] }, "order": 1, "steps": [ { "id": "0hcb717e-c442-4185-8bc1-cc998844f567", "sendAfter": 0, "contact": { "method": "email", "to": "test@atlassian.com" }, "enabled": true } ], "repeat": { "loopAfter": 1, "enabled": true }, "enabled": true }
GET

Get notification ruleExperimental

Gets a notification rule with given id in the request.

read:ops-config:jira-service-management

Request

Path parameters

id

string

Required

Responses

Returned if the request is successful.

application/json

NotificationRuleResponse
GET/v1/notification-rules/{id}
1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/notification-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 35 36 37 38 { "id": "4292c912-12ac-4ac0-b195-9484fbb98c5c", "name": "Create Alert", "actionType": "create-alert", "criteria": { "type": "match-all" }, "timeRestriction": { "type": "weekday-and-time-of-day", "restrictions": [ { "startDay": "monday", "endDay": "friday", "startHour": 13, "endHour": 18, "startMin": 0, "endMin": 0 } ] }, "order": 1, "steps": [ { "id": "0hcb717e-c442-4185-8bc1-cc998844f567", "sendAfter": 0, "contact": { "method": "email", "to": "test@atlassian.com" }, "enabled": true } ], "repeat": { "loopAfter": 1, "enabled": true }, "enabled": true }
DEL

Delete notification ruleExperimental

Deletes a notification rule with given id in the request.

read:ops-config:jira-service-management
,
delete:ops-config:jira-service-management

Request

Path parameters

id

string

Required

Responses

Returned if the request is successful.

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

Update notification ruleExperimental

Updates a notification rule with given id in the request.

read:ops-config:jira-service-management
,
write:ops-config:jira-service-management

Request

Path parameters

id

string

Required

Request bodyapplication/json

name

string

Required
actionType

string

Required
criteria

oneOf [NotificationRulesMatchAllAnyConditionsFilter, NotificationRulesMatchAllFilter]

notificationTime

array<string>

timeRestriction

oneOf [NotificationRulesTimeOfDayTimeRestrictionInterval, NotificationRulesWeekdayTimeRestrictionInterval]

schedules

array<string>

order

integer

steps

array<NotificationRulesCreateNotificationRuleStepRequest>

repeat

NotificationRuleRepeat

enabled

boolean

Required

Responses

Returned if the request is successful.

application/json

NotificationRuleResponse
PATCH/v1/notification-rules/{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 curl --request PATCH \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/notification-rules/{id}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "name": "Create Alert", "actionType": "create-alert", "criteria": { "type": "match-all" }, "steps": [ { "id": "0hcb717e-c442-4185-8bc1-cc998844f567", "sendAfter": 0, "contact": { "method": "email", "to": "test@atlassian.com" }, "enabled": true } ], "enabled": true }'
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 { "id": "4292c912-12ac-4ac0-b195-9484fbb98c5c", "name": "Create Alert", "actionType": "create-alert", "criteria": { "type": "match-all" }, "timeRestriction": { "type": "weekday-and-time-of-day", "restrictions": [ { "startDay": "monday", "endDay": "friday", "startHour": 13, "endHour": 18, "startMin": 0, "endMin": 0 } ] }, "order": 1, "steps": [ { "id": "0hcb717e-c442-4185-8bc1-cc998844f567", "sendAfter": 0, "contact": { "method": "email", "to": "test@atlassian.com" }, "enabled": true } ], "repeat": { "loopAfter": 1, "enabled": true }, "enabled": true }

Rate this page: