Notifications API - PUT a notification configuration

This API is deprecated. Use the Settings API instead. Look for the Problem notifications (builtin:problem.notifications) schema.

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.

PUTSaaShttps://{your-environment-id}.live.dynatrace.com/api/config/v1/notifications/{id}
Environment ActiveGatehttps://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/notifications/{id}

Authentication

To execute this request, you need an access token with WriteConfig scope.

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

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

body
optional

Request body objects

The NotificationConfig object

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

Element
Type
Description
Required
active
boolean

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

required
alertingProfile
string

The ID of the associated alerting profile.

required
id
string

The ID of the notification configuration.

optional
name
string

The name of the notification configuration.

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
  • VICTOROPS -> VictorOpsNotificationConfig
  • SERVICE_NOW -> ServiceNowNotificationConfig
  • XMATTERS -> XMattersNotificationConfig
  • ANSIBLETOWER -> AnsibleTowerNotificationConfig
  • OPS_GENIE -> OpsGenieNotificationConfig
  • JIRA -> JiraNotificationConfig
  • TRELLO -> TrelloNotificationConfig
  • ANSIBLETOWER
  • EMAIL
  • JIRA
  • OPS_GENIE
  • PAGER_DUTY
  • SERVICE_NOW
  • SLACK
  • TRELLO
  • VICTOROPS
  • WEBHOOK
  • XMATTERS
required

Request body JSON model

This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.

{
"active": true,
"alertingProfile": "4f5e00f4-39b3-455a-820b-3514843615f3",
"description": "{ProblemDetailsText}",
"id": "acbed0c4-4ef1-4303-991f-102510a69322",
"issueType": "Task",
"name": "REST example",
"password": "",
"projectKey": "DEV",
"summary": "Problem {ProblemID}: {ProblemTitle}",
"type": "JIRA",
"url": "https://my-jira.atlassian.net/rest/api/2/",
"username": "john.smith"
}

Response

Response codes

Code
Type
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 objects

The NotificationConfigStub object

The short representation of a notification.

Element
Type
Description
description
string

A short description of the Dynatrace entity.

id
string

The ID of the Dynatrace entity.

name
string

The name of the Dynatrace entity.

type
string

The type of the notification.

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

Response body JSON model

{
"description": "string",
"id": "string",
"name": "string",
"type": "ANSIBLETOWER"
}

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.

POSTSaaShttps://{your-environment-id}.live.dynatrace.com/api/config/v1/notifications/{id}/validator
Environment ActiveGatehttps://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/notifications/{id}/validator

Authentication

To execute this request, you need an access token with WriteConfig scope.

To learn how to obtain and use it, see Tokens and authentication.

Response

Response codes

Code
Type
Description
204
-

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

400

Failed. The input is invalid.