@@ -11,15 +11,16 @@ parent = "http_api"
11
11
12
12
# Alerting Notification Channels API
13
13
14
+ This page documents the Alerting Notification Channels API.
15
+
14
16
## Identifier (id) vs unique identifier (uid)
15
17
16
18
The identifier (id) of a notification channel is an auto-incrementing numeric value and is only unique per Grafana install.
17
19
18
20
The unique identifier (uid) of a notification channel can be used for uniquely identify a notification channel between
19
21
multiple Grafana installs. It's automatically generated if not provided when creating a notification channel. The uid
20
- allows having consistent URL's for accessing notification channels and when syncing notification channels between multiple
21
- Grafana installs, see [ alert notification channel provisioning] ( /administration/provisioning/#alert-notification-channels )
22
- for more information.
22
+ allows having consistent URLs for accessing notification channels and when syncing notification channels between multiple
23
+ Grafana installations, refer to [ alert notification channel provisioning] ({{< relref "../administration/provisioning.md#alert-notification-channels" >}}).
23
24
24
25
The uid can have a maximum length of 40 characters.
25
26
@@ -29,7 +30,7 @@ Returns all notification channels that the authenticated user has permission to
29
30
30
31
` GET /api/alert-notifications `
31
32
32
- ** Example Request ** :
33
+ ** Example request ** :
33
34
34
35
``` http
35
36
GET /api/alert-notifications HTTP/1.1
@@ -38,7 +39,7 @@ Content-Type: application/json
38
39
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
39
40
```
40
41
41
- ** Example Response ** :
42
+ ** Example response ** :
42
43
43
44
``` http
44
45
HTTP/1.1 200
@@ -65,13 +66,11 @@ Content-Type: application/json
65
66
66
67
## Get all notification channels (lookup)
67
68
68
- Returns all notification channels, but with less detailed information.
69
- Accessible by any authenticated user and is mainly used by providing
70
- alert notification channels in Grafana UI when configuring alert rule.
69
+ Returns all notification channels, but with less detailed information. Accessible by any authenticated user and is mainly used by providing alert notification channels in Grafana UI when configuring alert rule.
71
70
72
71
` GET /api/alert-notifications/lookup `
73
72
74
- ** Example Request ** :
73
+ ** Example request ** :
75
74
76
75
``` http
77
76
GET /api/alert-notifications/lookup HTTP/1.1
@@ -80,7 +79,7 @@ Content-Type: application/json
80
79
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
81
80
```
82
81
83
- ** Example Response ** :
82
+ ** Example response ** :
84
83
85
84
``` http
86
85
HTTP/1.1 200
@@ -109,9 +108,9 @@ Content-Type: application/json
109
108
110
109
` GET /api/alert-notifications/uid/:uid `
111
110
112
- Will return the notification channel given the notification channel uid.
111
+ Returns the notification channel given the notification channel uid.
113
112
114
- ** Example Request ** :
113
+ ** Example request ** :
115
114
116
115
``` http
117
116
GET /api/alert-notifications/uid/team-a-email-notifier HTTP/1.1
@@ -120,7 +119,7 @@ Content-Type: application/json
120
119
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
121
120
```
122
121
123
- ** Example Response ** :
122
+ ** Example response ** :
124
123
125
124
``` http
126
125
HTTP/1.1 200
@@ -146,9 +145,9 @@ Content-Type: application/json
146
145
147
146
` GET /api/alert-notifications/:id `
148
147
149
- Will return the notification channel given the notification channel id.
148
+ Returns the notification channel given the notification channel id.
150
149
151
- ** Example Request ** :
150
+ ** Example request ** :
152
151
153
152
``` http
154
153
GET /api/alert-notifications/1 HTTP/1.1
@@ -157,7 +156,7 @@ Content-Type: application/json
157
156
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
158
157
```
159
158
160
- ** Example Response ** :
159
+ ** Example response ** :
161
160
162
161
``` http
163
162
HTTP/1.1 200
@@ -181,11 +180,11 @@ Content-Type: application/json
181
180
182
181
## Create notification channel
183
182
184
- You can find the full list of [ supported notifiers] ( /alerting/notifications/#all-supported-notifier ) at the alert notifiers page.
183
+ You can find the full list of [ supported notifiers] ( /alerting/notifications/#all-supported-notifier ) on the alert notifiers page.
185
184
186
185
` POST /api/alert-notifications `
187
186
188
- ** Example Request ** :
187
+ ** Example request ** :
189
188
190
189
``` http
191
190
POST /api/alert-notifications HTTP/1.1
@@ -205,7 +204,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
205
204
}
206
205
```
207
206
208
- ** Example Response ** :
207
+ ** Example response ** :
209
208
210
209
``` http
211
210
HTTP/1.1 200
@@ -232,7 +231,7 @@ Content-Type: application/json
232
231
233
232
Updates an existing notification channel identified by uid.
234
233
235
- ** Example Request ** :
234
+ ** Example request ** :
236
235
237
236
``` http
238
237
PUT /api/alert-notifications/uid/cIBgcSjkk HTTP/1.1
@@ -253,7 +252,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
253
252
}
254
253
```
255
254
256
- ** Example Response ** :
255
+ ** Example response ** :
257
256
258
257
``` http
259
258
HTTP/1.1 200
@@ -281,7 +280,7 @@ Content-Type: application/json
281
280
282
281
Updates an existing notification channel identified by id.
283
282
284
- ** Example Request ** :
283
+ ** Example request ** :
285
284
286
285
``` http
287
286
PUT /api/alert-notifications/1 HTTP/1.1
@@ -303,7 +302,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
303
302
}
304
303
```
305
304
306
- ** Example Response ** :
305
+ ** Example response ** :
307
306
308
307
``` http
309
308
HTTP/1.1 200
@@ -331,7 +330,7 @@ Content-Type: application/json
331
330
332
331
Deletes an existing notification channel identified by uid.
333
332
334
- ** Example Request ** :
333
+ ** Example request ** :
335
334
336
335
``` http
337
336
DELETE /api/alert-notifications/uid/team-a-email-notifier HTTP/1.1
@@ -340,7 +339,7 @@ Content-Type: application/json
340
339
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
341
340
```
342
341
343
- ** Example Response ** :
342
+ ** Example response ** :
344
343
345
344
``` http
346
345
HTTP/1.1 200
@@ -357,7 +356,7 @@ Content-Type: application/json
357
356
358
357
Deletes an existing notification channel identified by id.
359
358
360
- ** Example Request ** :
359
+ ** Example request ** :
361
360
362
361
``` http
363
362
DELETE /api/alert-notifications/1 HTTP/1.1
@@ -366,7 +365,7 @@ Content-Type: application/json
366
365
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
367
366
```
368
367
369
- ** Example Response ** :
368
+ ** Example response ** :
370
369
371
370
``` http
372
371
HTTP/1.1 200
@@ -384,7 +383,7 @@ You can find the full list of [supported notifiers](/alerting/notifications/#all
384
383
385
384
` POST /api/alert-notifications/test `
386
385
387
- ** Example Request ** :
386
+ ** Example request ** :
388
387
389
388
``` http
390
389
POST /api/alert-notifications/test HTTP/1.1
@@ -400,7 +399,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
400
399
}
401
400
```
402
401
403
- ** Example Response ** :
402
+ ** Example response ** :
404
403
405
404
``` http
406
405
HTTP/1.1 200
@@ -410,4 +409,3 @@ Content-Type: application/json
410
409
"message": "Test notification sent"
411
410
}
412
411
```
413
-
0 commit comments