Notification groups

Register notification groups

POST /api/v0/notification-groups

Required permissions for API key

  • Read
  • Write

Input

KEY TYPE DESCRIPTION
name string the name of the notification group
notificationLevel string the level of notification ("all" or "critical")
childNotificationGroupIds array[string] an array of notification group IDs
childChannelIds array[string] an array of notification channel IDs
monitors array[monitor] [optional] an array of notification target monitor rules
services array[service] [optional] an array of notification target services

monitor is an object with the following keys

KEY TYPE DESCRIPTION
id string the monitor rule ID
skipDefault boolean If true, send notifications to this notification group only

service is an object with the following keys

KEY TYPE DESCRIPTION
name string the name of the service

Example input

{
  "name": "Example notification group",
  "notificationLevel": "all",
  "childNotificationGroupIds": [],
  "childChannelIds": [
    "2vh7AZ21abc"
  ],
  "monitors": [
    {
      "id": "2qtozU21abc",
      "skipDefault": false
    }
  ],
  "services": [
    {
      "name": "Example-Service-1"
    },
    {
      "name": "Example-Service-2"
    }
  ]
}

Response

The input is returned along with an ID.

Error

STATUS CODE DESCRIPTION
400 when the input is in a format that can’t be received
400 when creating fails
403 when the API doesn't have the required permissions / when accessing from outside the permitted IP address range

Get the notification group list

GET /api/v0/notification-groups

Required permissions for API key

  • Read

Response

{
  "notificationGroups": [<notification-group>, <notification-group>, ...]
}

<notification-group> is the same as the registration API response

Update notification groups

PUT /api/v0/notification-groups/<notificationGroupId>

Required permissions for API key

  • Read
  • Write

Input

The same object as the registration API entry

Response

The same object as registration API response

Error

STATUS CODE DESCRIPTION
400 when the input is in a format that can’t be received
400 when an attempt to change the name of the default notification group is made
400 when updating fails
404 when the specified notification group does not exist
403 when the API doesn't have the required permissions / when accessing from outside the permitted IP address range

Delete notification groups

The organization’s default notification group can not be deleted

DELETE /api/v0/notification-groups/<notificationGroupId>

Required permissions for API key

  • Read
  • Write

Response

The notification group before deletion is returned

Error

STATUS CODE DESCRIPTION
400 when the specified notification group is the default group
400 when deleting fails
404 when the specified notification group does not exist
403 when the API doesn't have the required permissions / when accessing from outside the permitted IP address range