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 URLs for accessing notification channels and when syncing notification channels between multiple Grafana installations, refer to alert notification channel provisioning.
The uid can have a maximum length of 40 characters.
Get all notification channels
Returns all notification channels that the authenticated user has permission to view.
GET /api/alert-notifications
Example request:
Example response:
Get all notification channels (lookup)
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.
GET /api/alert-notifications/lookup
Example request:
Example response:
Get notification channel by uid
GET /api/alert-notifications/uid/:uid
Returns the notification channel given the notification channel uid.
Example request:
Example response:
Get notification channel by id
GET /api/alert-notifications/:id
Returns the notification channel given the notification channel id.
Example request:
Example response:
Create notification channel
You can find the full list of supported notifiers on the alert notifiers page.
POST /api/alert-notifications
Example request:
Example response:
Update notification channel by uid
PUT /api/alert-notifications/uid/:uid
Updates an existing notification channel identified by uid.
Example request:
Example response:
Update notification channel by id
PUT /api/alert-notifications/:id
Updates an existing notification channel identified by id.
Example request:
Example response:
Delete alert notification by uid
DELETE /api/alert-notifications/uid/:uid
Deletes an existing notification channel identified by uid.
Example request:
Example response:
Delete alert notification by id
DELETE /api/alert-notifications/:id
Deletes an existing notification channel identified by id.
Example request:
Example response:
Test notification channel
Sends a test notification message for the given notification channel type and settings. You can find the full list of supported notifiers at the alert notifiers page.
POST /api/alert-notifications/test
Example request:
Example response: