Docs: Update alerting_notification_channels.md (#21245)

* Update alerting_notification_channels.md

Minor edits and fixed stacked heading issue.

* Update docs/sources/http_api/alerting_notification_channels.md

Co-Authored-By: Marcus Efraimsson <marcus.efraimsson@gmail.com>

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
This commit is contained in:
Diana Payton
2019-12-31 07:30:53 -08:00
committed by GitHub
parent 3667781e6f
commit ea934048f0

View File

@@ -11,15 +11,16 @@ parent = "http_api"
# Alerting Notification Channels API
This page documents the Alerting Notification Channels API.
## Identifier (id) vs unique identifier (uid)
The identifier (id) of a notification channel is an auto-incrementing numeric value and is only unique per Grafana install.
The unique identifier (uid) of a notification channel can be used for uniquely identify a notification channel between
multiple Grafana installs. It's automatically generated if not provided when creating a notification channel. The uid
allows having consistent URL's for accessing notification channels and when syncing notification channels between multiple
Grafana installs, see [alert notification channel provisioning](/administration/provisioning/#alert-notification-channels)
for more information.
allows having consistent URLs for accessing notification channels and when syncing notification channels between multiple
Grafana installations, refer to [alert notification channel provisioning]({{< relref "../administration/provisioning.md#alert-notification-channels" >}}).
The uid can have a maximum length of 40 characters.
@@ -29,7 +30,7 @@ Returns all notification channels that the authenticated user has permission to
`GET /api/alert-notifications`
**Example Request**:
**Example request**:
```http
GET /api/alert-notifications HTTP/1.1
@@ -38,7 +39,7 @@ Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example Response**:
**Example response**:
```http
HTTP/1.1 200
@@ -65,13 +66,11 @@ Content-Type: application/json
```http
HTTP/1.1 200
```http
HTTP/1.1 200
Content-Type: application/json
Content-Type: application/json
```
## Get notification channel by uid
## Get notification channel by uid
`GET /api/alert-notifications/uid/:uid`
@@ -80,7 +79,7 @@ Content-Type: application/json
**Example request**:
```http
GET /api/alert-notifications/uid/team-a-email-notifier HTTP/1.1
GET /api/alert-notifications/uid/team-a-email-notifier HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
@@ -109,9 +108,9 @@ Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example Response**:
**Example response**:
```http
```http
HTTP/1.1 200
Content-Type: application/json
@@ -120,7 +119,7 @@ Content-Type: application/json
## Create notification channel
You can find the full list of [supported notifiers](/alerting/notifications/#all-supported-notifier) on the alert notifiers page.
`POST /api/alert-notifications`
**Example request**:
@@ -146,9 +145,9 @@ Content-Type: application/json
`PUT /api/alert-notifications/uid/:uid`
Updates an existing notification channel identified by uid.
**Example request**:
```http
PUT /api/alert-notifications/uid/cIBgcSjkk HTTP/1.1
Accept: application/json
@@ -157,7 +156,7 @@ Content-Type: application/json
```
**Example Response**:
**Example response**:
```http
HTTP/1.1 200
@@ -181,11 +180,11 @@ Content-Type: application/json
```
**Example Response**:
**Example response**:
```http
HTTP/1.1 200
Content-Type: application/json
Content-Type: application/json
```
@@ -205,7 +204,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example response**:
```http
HTTP/1.1 200
Content-Type: application/json
@@ -232,7 +231,7 @@ Content-Type: application/json
```http
HTTP/1.1 200
Content-Type: application/json
```
## Test notification channel
@@ -253,7 +252,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example response**:
```http
HTTP/1.1 200
Content-Type: application/json
@@ -281,7 +280,7 @@ Content-Type: application/json
Updates an existing notification channel identified by id.
**Example Request**:
**Example request**:
```http
PUT /api/alert-notifications/1 HTTP/1.1
@@ -303,7 +302,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
}
```
**Example Response**:
**Example response**:
```http
HTTP/1.1 200
@@ -331,7 +330,7 @@ Content-Type: application/json
Deletes an existing notification channel identified by uid.
**Example Request**:
**Example request**:
```http
DELETE /api/alert-notifications/uid/team-a-email-notifier HTTP/1.1
@@ -340,7 +339,7 @@ Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example Response**:
**Example response**:
```http
HTTP/1.1 200
@@ -357,7 +356,7 @@ Content-Type: application/json
Deletes an existing notification channel identified by id.
**Example Request**:
**Example request**:
```http
DELETE /api/alert-notifications/1 HTTP/1.1
@@ -366,7 +365,7 @@ Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example Response**:
**Example response**:
```http
HTTP/1.1 200
@@ -384,7 +383,7 @@ You can find the full list of [supported notifiers](/alerting/notifications/#all
`POST /api/alert-notifications/test`
**Example Request**:
**Example request**:
```http
POST /api/alert-notifications/test HTTP/1.1
@@ -400,7 +399,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
}
```
**Example Response**:
**Example response**:
```http
HTTP/1.1 200
@@ -410,4 +409,3 @@ Content-Type: application/json
"message": "Test notification sent"
}
```