Notification Channels API
Contents
Create a notification channel
POST
/v2/notifications/
Path Parameters
Name | Type | Description |
---|---|---|
type* | String | The type of notification channel to create. |
description* | String | A name for the channel. |
destination* | String | The destination for the notification. ie the email address for email, slack webhook URL for slack, etc. |
auto_resolve | String | Only used by VictorOps and PagerDuty channels. Defaults to false. More info here. |
Request format:
Curl example
Search notification channels
GET
/v2/notifications/?query
Returns a JSON object containing information on notification channels matching the search query. Returns all the notifications if the parameter is left empty.
Path Parameters
Name | Type | Description |
---|---|---|
type | String | Format: The notification type to search for. Can specify multiple types to search for more than 1. |
description | String | Format: The descriptions to search for. Can specify multiple descriptions to search for more than 1. |
id | String | Format: The notification id to search for. Can specify multiple ids to search for more than 1. |
page | String | Format: The page number to query. Used if there are more items than can be displayed in a single request (default: 1). |
max | String | Format: The maximum number of items to display. Limit of 100 (default: 100). |
auto_resolve | String | For use with VictorOps and PagerDuty channels only. |
Curl example
Specifying multiple fields performs an OR
operation and returns notifications that match either criteria.
Obtain information on a single alert
GET
/v2/notifications/<notification_id>/
Returns a single notification identified by the notification id.
Path Parameters
Name | Type | Description |
---|---|---|
type* | String | The type of notification channel to create. |
description* | String | A name for the channel. |
destination* | String | The destination for the notification. ie the email address for email, slack webhook URL for slack, etc. |
auto_resolve | String | Only used by VictorOps and PagerDuty channels. Defaults to false. |
Curl example
Obtain information of the notification channel identified by the id 123-456-789
.
Update notification channels
PUT
/v2/notifications/<notification_id>/
Updates a notification channel identified by the notification id.
Path Parameters
Name | Type | Description |
---|---|---|
type | String | The type of notification channel to create. |
description | String | A name for the channel. |
destination | String | The destination for the notification. ie the email address for email, slack webhook URL for slack, etc. |
auto_resolve | String | Only used by VictorOps and PagerDuty channels. Defaults to false. |
Curl example
Updates the destination of notification 123-456-789
. Each field is optional and only the specified fields are updated.
DELETE /v2/notifications/<notification_id>/
- Deletes a notification channel identified by the notification id.
Curl example
Delete the notification channel identified by the id 123-456-789
.
Status Codes:
200 - OK
404 - Notification channel doesn’t exist.
Last updated