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 |
|
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 |
Notification |
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 ( |
required |
type | string |
Defines the actual set of fields depending on the value. See one of the following objects:
|
required |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request. See the Example expandable section for working sample request.
{
"type": "JIRA",
"id": "acbed0c4-4ef1-4303-991f-102510a69322",
"name": "REST example",
"alertingProfile": "4f5e00f4-39b3-455a-820b-3514843615f3",
"active": true,
"username": "john.smith",
"password": "",
"url": "https://my-jira.atlassian.net/rest/api/2/",
"projectKey": "DEV",
"issueType": "Task",
"summary": "Problem {ProblemID}: {ProblemTitle}",
"description": "{ProblemDetailsText}\n"
}
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. |
{
"id": "string",
"name": "string",
"description": "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.
POST |
|
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.