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.
Lists all notification rules for the user. It optionally takes two parameters - offset and size.
read:ops-config:jira-service-management
integer
integer
Returned if the request is successful.
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'
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"
}
}
Creates a notification rule with the given properties for the user.
read:ops-config:jira-service-management
write:ops-config:jira-service-management
string
Requiredstring
RequiredoneOf [NotificationRulesMatchAllAnyConditionsFilter, NotificationRulesMatchAllFilter]
array<string>
oneOf [NotificationRulesTimeOfDayTimeRestrictionInterval, NotificationRulesWeekdayTimeRestrictionInterval]
array<string>
integer
array<NotificationRulesCreateNotificationRuleStepRequest>
NotificationRuleRepeat
boolean
RequiredReturned if the request is successful.
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
}'
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
}
Gets a notification rule with given id in the request.
read:ops-config:jira-service-management
string
RequiredReturned if the request is successful.
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'
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
}
Deletes a notification rule with given id in the request.
read:ops-config:jira-service-management
delete:ops-config:jira-service-management
string
RequiredReturned if the request is successful.
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>'
Updates a notification rule with given id in the request.
read:ops-config:jira-service-management
write:ops-config:jira-service-management
string
Requiredstring
Requiredstring
RequiredoneOf [NotificationRulesMatchAllAnyConditionsFilter, NotificationRulesMatchAllFilter]
array<string>
oneOf [NotificationRulesTimeOfDayTimeRestrictionInterval, NotificationRulesWeekdayTimeRestrictionInterval]
array<string>
integer
array<NotificationRulesCreateNotificationRuleStepRequest>
NotificationRuleRepeat
boolean
RequiredReturned if the request is successful.
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
}'
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: