Notifications API - PUT a notification configuration

Updates the specified notification configuration.

If a notification configuration with the specified ID doesn't exist, a new configuration is created.

The request consumes and produces an application/json payload.

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

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
id string

The ID of the notification configuration to be updated.

If you set the ID in the body as well, it must match this ID.

path required
body NotificationConfig

The JSON body of the request. Contains updated parameters of the 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
required

Response

Response codes

Code Description
201

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

204

Success. The notification configuration has been updated. The response doesn't have a body.

400

Failed. The input is invalid.

Response body

The NotificationConfigStub object

The short representation of a notification.

Element Type Description
id string

The ID of the Dynatrace entity.

name string

The name of the Dynatrace entity.

description string

A short description of the Dynatrace entity.

type string

The type of the notification.

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/{id}/validator
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/notifications/{id}/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.