This resource represents notification schemes, lists of events and the recipients who will receive notifications for those events. Use it to get details of a notification scheme and a list of notification schemes.
A notification scheme is a list of events and recipients who will receive notifications for those events. The list is contained within the notificationSchemeEvents
object and contains pairs of events
and notifications
:
event
Identifies the type of event. The events can be Jira system events (see the Events section) or custom events.
notifications
Identifies the recipients of notifications for each event. Recipients can be any of the following types:
CurrentAssignee
Reporter
CurrentUser
ProjectLead
ComponentLead
User
(the parameter
is the user key)Group
(the parameter
is the group name)ProjectRole
(the parameter
is the project role ID)EmailAddress
(deprecated)AllWatchers
UserCustomField
(the parameter
is the ID of the custom field)GroupCustomField
(the parameter
is the ID of the custom field)Returns a paginated list of notification schemes ordered by the display name.
Note that you should allow for events without recipients to appear in responses.
Permissions required: Permission to access Jira, however, the user must have permission to administer at least one project associated with a notification scheme for it to be returned.
manage:jira-configuration
read:field:jira
, read:notification-scheme:jira
, read:project:jira
, read:project-role:jira
, read:user:jira
...(Show more)Connect app scope required: ADMIN
string
string
array<string>
array<string>
boolean
string
Returned if the request is successful. Only returns notification schemes that the user has permission to access. An empty list is returned if the user lacks permission to access all notification schemes.
A page of items.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/notificationscheme`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
{
"isLast": false,
"maxResults": 6,
"startAt": 1,
"total": 5,
"values": [
{
"description": "description",
"expand": "notificationSchemeEvents,user,group,projectRole,field,all",
"id": 10100,
"name": "notification scheme name",
"notificationSchemeEvents": [
{
"event": {
"description": "Event published when an issue is created",
"id": 1,
"name": "Issue created"
},
"notifications": [
{
"expand": "group",
"group": {
"groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
"name": "jira-administrators",
"self": "https://your-domain.atlassian.net/rest/api/3/group?groupId=276f955c-63d7-42c8-9520-92d01dca0625"
},
"id": 1,
"notificationType": "Group",
"parameter": "jira-administrators",
"recipient": "276f955c-63d7-42c8-9520-92d01dca0625"
},
{
"id": 2,
"notificationType": "CurrentAssignee"
},
{
"expand": "projectRole",
"id": 3,
"notificationType": "ProjectRole",
"parameter": "10360",
"projectRole": {
"self": "https://your-domain.atlassian.net/rest/api/3/project/MKY/role/10360",
"name": "Developers",
"id": 10360,
"description": "A project role that represents developers in a project",
"actors": [
{
"actorGroup": {
"name": "jira-developers",
"displayName": "jira-developers",
"groupId": "952d12c3-5b5b-4d04-bb32-44d383afc4b2"
},
"displayName": "jira-developers",
"id": 10240,
"name": "jira-developers",
"type": "atlassian-group-role-actor"
},
{
"actorUser": {
"accountId": "5b10a2844c20165700ede21g"
},
"displayName": "Mia Krystof",
"id": 10241,
"type": "atlassian-user-role-actor"
}
],
"scope": {
"project": {
"id": "10000",
"key": "KEY",
"name": "Next Gen Project"
},
"type": "PROJECT"
}
},
"recipient": "10360"
},
{
"emailAddress": "rest-developer@atlassian.com",
"id": 4,
"notificationType": "EmailAddress",
"parameter": "rest-developer@atlassian.com",
"recipient": "rest-developer@atlassian.com"
},
{
"expand": "user",
"id": 5,
"notificationType": "User",
"parameter": "5b10a2844c20165700ede21g",
"recipient": "5b10a2844c20165700ede21g",
"user": {
"accountId": "5b10a2844c20165700ede21g",
"active": false,
"displayName": "Mia Krystof",
"self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
}
},
{
"expand": "field",
"field": {
"clauseNames": [
"cf[10101]",
"New custom field"
],
"custom": true,
"id": "customfield_10101",
"key": "customfield_10101",
"name": "New custom field",
"navigable": true,
"orderable": true,
"schema": {
"custom": "com.atlassian.jira.plugin.system.customfieldtypes:project",
"customId": 10101,
"type": "project"
},
"searchable": true,
"untranslatedName": "New custom field"
},
"id": 6,
"notificationType": "GroupCustomField",
"parameter": "customfield_10101",
"recipient": "customfield_10101"
}
]
},
{
"event": {
"description": "Custom event that is published together with an issue created event",
"id": 20,
"name": "Custom event",
"templateEvent": {
"description": "Event published when an issue is created",
"id": 1,
"name": "Issue created"
}
},
"notifications": [
{
"expand": "group",
"group": {
"groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
"name": "jira-administrators",
"self": "https://your-domain.atlassian.net/rest/api/3/group?groupId=276f955c-63d7-42c8-9520-92d01dca0625"
},
"id": 1,
"notificationType": "Group",
"parameter": "jira-administrators",
"recipient": "276f955c-63d7-42c8-9520-92d01dca0625"
},
{
"id": 2,
"notificationType": "CurrentAssignee"
},
{
"expand": "projectRole",
"id": 3,
"notificationType": "ProjectRole",
"parameter": "10360",
"projectRole": {
"self": "https://your-domain.atlassian.net/rest/api/3/project/MKY/role/10360",
"name": "Developers",
"id": 10360,
"description": "A project role that represents developers in a project",
"actors": [
{
"actorGroup": {
"name": "jira-developers",
"displayName": "jira-developers",
"groupId": "952d12c3-5b5b-4d04-bb32-44d383afc4b2"
},
"displayName": "jira-developers",
"id": 10240,
"name": "jira-developers",
"type": "atlassian-group-role-actor"
},
{
"actorUser": {
"accountId": "5b10a2844c20165700ede21g"
},
"displayName": "Mia Krystof",
"id": 10241,
"type": "atlassian-user-role-actor"
}
],
"scope": {
"project": {
"id": "10000",
"key": "KEY",
"name": "Next Gen Project"
},
"type": "PROJECT"
}
},
"recipient": "10360"
},
{
"emailAddress": "rest-developer@atlassian.com",
"id": 4,
"notificationType": "EmailAddress",
"parameter": "rest-developer@atlassian.com",
"recipient": "rest-developer@atlassian.com"
},
{
"expand": "user",
"id": 5,
"notificationType": "User",
"parameter": "5b10a2844c20165700ede21g",
"recipient": "5b10a2844c20165700ede21g",
"user": {
"accountId": "5b10a2844c20165700ede21g",
"active": false,
"displayName": "Mia Krystof",
"self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
}
},
{
"expand": "field",
"field": {
"clauseNames": [
"cf[10101]",
"New custom field"
],
"custom": true,
"id": "customfield_10101",
"key": "customfield_10101",
"name": "New custom field",
"navigable": true,
"orderable": true,
"schema": {
"custom": "com.atlassian.jira.plugin.system.customfieldtypes:project",
"customId": 10101,
"type": "project"
},
"searchable": true,
"untranslatedName": "New custom field"
},
"id": 6,
"notificationType": "GroupCustomField",
"parameter": "customfield_10101",
"recipient": "customfield_10101"
}
]
}
],
"projects": [
10001,
10002
],
"self": "https://your-domain.atlassian.net/rest/api/3/notificationscheme"
}
]
}
Creates a notification scheme with notifications. You can create up to 1000 notifications per request.
Permissions required: Administer Jira global permission.
manage:jira-configuration
Connect app scope required: ADMIN
string
string
Requiredarray<NotificationSchemeEventDetails>
any
Returned if the request is successful.
The ID of a notification scheme.
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
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"description": "My new scheme description",
"name": "My new notification scheme",
"notificationSchemeEvents": [
{
"event": {
"id": "1"
},
"notifications": [
{
"notificationType": "Group",
"parameter": "jira-administrators"
}
]
}
]
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/notificationscheme`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
{
"id": "10001"
}
Returns a paginated mapping of project that have notification scheme assigned. You can provide either one or multiple notification scheme IDs or project IDs to filter by. If you don't provide any, this will return a list of all mappings. Note that only company-managed (classic) projects are supported. This is because team-managed projects don't have a concept of a default notification scheme. The mappings are ordered by projectId.
Permissions required: Permission to access Jira.
manage:jira-configuration
read:notification-scheme:jira
, read:project:jira
Connect app scope required: ADMIN
string
string
array<string>
array<string>
Returned if the request is successful.
A page of items.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/notificationscheme/project`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
{
"isLast": true,
"maxResults": 50,
"startAt": 0,
"total": 4,
"values": [
{
"notificationSchemeId": "10001",
"projectId": "100001"
}
]
}
Returns a notification scheme, including the list of events and the recipients who will receive notifications for those events.
Permissions required: Permission to access Jira, however, the user must have permission to administer at least one project associated with the notification scheme.
manage:jira-configuration
read:field:jira
, read:notification-scheme:jira
, read:project:jira
, read:project-role:jira
, read:user:jira
...(Show more)Connect app scope required: ADMIN
integer
Requiredstring
Returned if the request is successful.
Details about a notification scheme.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/notificationscheme/{id}`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
{
"description": "description",
"expand": "notificationSchemeEvents,user,group,projectRole,field,all",
"id": 10100,
"name": "notification scheme name",
"notificationSchemeEvents": [
{
"event": {
"description": "Event published when an issue is created",
"id": 1,
"name": "Issue created"
},
"notifications": [
{
"expand": "group",
"group": {
"groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
"name": "jira-administrators",
"self": "https://your-domain.atlassian.net/rest/api/3/group?groupId=276f955c-63d7-42c8-9520-92d01dca0625"
},
"id": 1,
"notificationType": "Group",
"parameter": "jira-administrators",
"recipient": "276f955c-63d7-42c8-9520-92d01dca0625"
},
{
"id": 2,
"notificationType": "CurrentAssignee"
},
{
"expand": "projectRole",
"id": 3,
"notificationType": "ProjectRole",
"parameter": "10360",
"projectRole": {
"self": "https://your-domain.atlassian.net/rest/api/3/project/MKY/role/10360",
"name": "Developers",
"id": 10360,
"description": "A project role that represents developers in a project",
"actors": [
{
"actorGroup": {
"name": "jira-developers",
"displayName": "jira-developers",
"groupId": "952d12c3-5b5b-4d04-bb32-44d383afc4b2"
},
"displayName": "jira-developers",
"id": 10240,
"name": "jira-developers",
"type": "atlassian-group-role-actor"
},
{
"actorUser": {
"accountId": "5b10a2844c20165700ede21g"
},
"displayName": "Mia Krystof",
"id": 10241,
"type": "atlassian-user-role-actor"
}
],
"scope": {
"project": {
"id": "10000",
"key": "KEY",
"name": "Next Gen Project"
},
"type": "PROJECT"
}
},
"recipient": "10360"
},
{
"emailAddress": "rest-developer@atlassian.com",
"id": 4,
"notificationType": "EmailAddress",
"parameter": "rest-developer@atlassian.com",
"recipient": "rest-developer@atlassian.com"
},
{
"expand": "user",
"id": 5,
"notificationType": "User",
"parameter": "5b10a2844c20165700ede21g",
"recipient": "5b10a2844c20165700ede21g",
"user": {
"accountId": "5b10a2844c20165700ede21g",
"active": false,
"displayName": "Mia Krystof",
"self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
}
},
{
"expand": "field",
"field": {
"clauseNames": [
"cf[10101]",
"New custom field"
],
"custom": true,
"id": "customfield_10101",
"key": "customfield_10101",
"name": "New custom field",
"navigable": true,
"orderable": true,
"schema": {
"custom": "com.atlassian.jira.plugin.system.customfieldtypes:project",
"customId": 10101,
"type": "project"
},
"searchable": true,
"untranslatedName": "New custom field"
},
"id": 6,
"notificationType": "GroupCustomField",
"parameter": "customfield_10101",
"recipient": "customfield_10101"
}
]
},
{
"event": {
"description": "Custom event that is published together with an issue created event",
"id": 20,
"name": "Custom event",
"templateEvent": {
"description": "Event published when an issue is created",
"id": 1,
"name": "Issue created"
}
},
"notifications": [
{
"expand": "group",
"group": {
"groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
"name": "jira-administrators",
"self": "https://your-domain.atlassian.net/rest/api/3/group?groupId=276f955c-63d7-42c8-9520-92d01dca0625"
},
"id": 1,
"notificationType": "Group",
"parameter": "jira-administrators",
"recipient": "276f955c-63d7-42c8-9520-92d01dca0625"
},
{
"id": 2,
"notificationType": "CurrentAssignee"
},
{
"expand": "projectRole",
"id": 3,
"notificationType": "ProjectRole",
"parameter": "10360",
"projectRole": {
"self": "https://your-domain.atlassian.net/rest/api/3/project/MKY/role/10360",
"name": "Developers",
"id": 10360,
"description": "A project role that represents developers in a project",
"actors": [
{
"actorGroup": {
"name": "jira-developers",
"displayName": "jira-developers",
"groupId": "952d12c3-5b5b-4d04-bb32-44d383afc4b2"
},
"displayName": "jira-developers",
"id": 10240,
"name": "jira-developers",
"type": "atlassian-group-role-actor"
},
{
"actorUser": {
"accountId": "5b10a2844c20165700ede21g"
},
"displayName": "Mia Krystof",
"id": 10241,
"type": "atlassian-user-role-actor"
}
],
"scope": {
"project": {
"id": "10000",
"key": "KEY",
"name": "Next Gen Project"
},
"type": "PROJECT"
}
},
"recipient": "10360"
},
{
"emailAddress": "rest-developer@atlassian.com",
"id": 4,
"notificationType": "EmailAddress",
"parameter": "rest-developer@atlassian.com",
"recipient": "rest-developer@atlassian.com"
},
{
"expand": "user",
"id": 5,
"notificationType": "User",
"parameter": "5b10a2844c20165700ede21g",
"recipient": "5b10a2844c20165700ede21g",
"user": {
"accountId": "5b10a2844c20165700ede21g",
"active": false,
"displayName": "Mia Krystof",
"self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
}
},
{
"expand": "field",
"field": {
"clauseNames": [
"cf[10101]",
"New custom field"
],
"custom": true,
"id": "customfield_10101",
"key": "customfield_10101",
"name": "New custom field",
"navigable": true,
"orderable": true,
"schema": {
"custom": "com.atlassian.jira.plugin.system.customfieldtypes:project",
"customId": 10101,
"type": "project"
},
"searchable": true,
"untranslatedName": "New custom field"
},
"id": 6,
"notificationType": "GroupCustomField",
"parameter": "customfield_10101",
"recipient": "customfield_10101"
}
]
}
],
"projects": [
10001,
10002
],
"self": "https://your-domain.atlassian.net/rest/api/3/notificationscheme"
}
Updates a notification scheme.
Permissions required: Administer Jira global permission.
manage:jira-configuration
Connect app scope required: ADMIN
string
Requiredstring
string
any
Returned if the request is successful.
any
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"description": "My updated notification scheme description",
"name": "My updated notification scheme"
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/notificationscheme/{id}`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
Adds notifications to a notification scheme. You can add up to 1000 notifications per request.
Deprecated: The notification type EmailAddress
is no longer supported in Cloud. Refer to the changelog for more details.
Permissions required: Administer Jira global permission.
manage:jira-configuration
Connect app scope required: ADMIN
string
Requiredarray<NotificationSchemeEventDetails>
Requiredany
Returned if the request is successful.
any
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
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"notificationSchemeEvents": [
{
"event": {
"id": "1"
},
"notifications": [
{
"notificationType": "Group",
"parameter": "jira-administrators"
}
]
}
]
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/notificationscheme/{id}/notification`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
Deletes a notification scheme.
Permissions required: Administer Jira global permission.
manage:jira-configuration
Connect app scope required: ADMIN
string
RequiredReturned if the request is successful.
any
1
2
3
4
5
6
7
8
9
10
11
12
13
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/notificationscheme/{notificationSchemeId}`, {
method: 'DELETE',
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
Removes a notification from a notification scheme.
Permissions required: Administer Jira global permission.
manage:jira-configuration
Connect app scope required: ADMIN
string
Requiredstring
RequiredReturned if the request is successful.
any
1
2
3
4
5
6
7
8
9
10
11
12
13
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/notificationscheme/{notificationSchemeId}/notification/{notificationId}`, {
method: 'DELETE',
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
Rate this page: