Notifications API - POST a notification configuration

Creates a new configuration.

The request consumes and produces an application/json payload.

POST
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/notifications
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/notifications

Authentication

To execute this request, you need the Write configuration (WriteConfig) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.

Parameters

Parameter Type Description In Required
body NotificationConfig

The JSON body of the request. Contains parameters of the new notification configuration.

body optional

Body format

The NotificationConfig object

Configuration of a notification. The actual set of fields depends on the type of the notification. See the Notifications API - JSON models help topic for example models of every notification type.

Element Type Description Required
id string

The ID of the notification configuration.

optional
name string

The name of the notification configuration.

required
alertingProfile string

The ID of the associated alerting profile.

required
active boolean

The configuration is enabled (true) or disabled (false).

required
type string

Defines the actual set of fields depending on the value. See one of the following objects:

  • EMAIL -> EmailNotificationConfig
  • PAGER_DUTY -> PagerDutyNotificationConfig
  • WEBHOOK -> WebHookNotificationConfig
  • SLACK -> SlackNotificationConfig
  • HIPCHAT -> HipChatNotificationConfig
  • VICTOROPS -> VictorOpsNotificationConfig
  • SERVICE_NOW -> ServiceNowNotificationConfig
  • XMATTERS -> XMattersNotificationConfig
  • ANSIBLETOWER -> AnsibleTowerNotificationConfig
  • OPS_GENIE -> OpsGenieNotificationConfig
  • JIRA -> JiraNotificationConfig
  • TRELLO -> TrelloNotificationConfig
The type element can hold these values.
required

Possible values

Possible values for the type element in the NotificationConfig object:

  • ANSIBLETOWER
  • EMAIL
  • HIPCHAT
  • JIRA
  • OPS_GENIE
  • PAGER_DUTY
  • SERVICE_NOW
  • SLACK
  • TRELLO
  • VICTOROPS
  • WEBHOOK
  • XMATTERS

Response

Response codes

Code Description
201

Success. The new notification configuration has been created. The response contains the ID of the new notification configuration.

400

Failed. The input is invalid.

Response body

A successful request doesn't return any content.

Validate payload

We recommend that you validate the payload before submitting it with an actual request. A response code of 204 indicates a valid payload.

The request consumes an application/json payload.

POST
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/notifications/validator
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/notifications/validator

Authentication

To execute this request, you need the Write configuration (WriteConfig) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.

Response

Response codes

Code Description
204

Validated. The submitted configuration is valid. The response doesn't have a body

400

Failed. The input is invalid.

Response body

A successful request doesn't return any content.