Notifications API - POST a notification configuration
Creates a new configuration.
The request consumes and produces an application/json
payload.
POST |
|
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
body | NotificationConfig |
The JSON body of the request. Contains parameters of the new notification configuration. |
body | optional |
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: 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 |
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"
}
Possible values
Possible values for the type element in the NotificationConfig object:
- PAGER_DUTY
- WEBHOOK
- SLACK
- HIPCHAT
- VICTOROPS
- SERVICE_NOW
- XMATTERS
- ANSIBLETOWER
- OPS_GENIE
- JIRA
- TRELLO
The AnsibleTowerNotificationConfig object
Configuration of the Ansible Tower notification.
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: 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 |
jobTemplateURL | string |
The URL of the target Ansible Tower job template. |
required |
acceptAnyCertificate | boolean |
Accept any, including self-signed and invalid, SSL certificate ( |
required |
username | string |
The username of the Ansible Tower account. |
required |
password | string |
The password for the Ansible Tower account. |
optional |
jobTemplateID | integer |
The ID of the target Ansible Tower job template. |
required |
customMessage | string |
The custom message of the notification. This message will be displayed in the extra variables Message field of your job template. You can use the following placeholders:
|
required |
Possible values
Possible values for the type element:
- PAGER_DUTY
- WEBHOOK
- SLACK
- HIPCHAT
- VICTOROPS
- SERVICE_NOW
- XMATTERS
- ANSIBLETOWER
- OPS_GENIE
- JIRA
- TRELLO
The EmailNotificationConfig object
Configuration of the email notification.
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: 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 |
subject | string |
The subject of the email notifications. |
required |
body | string |
The template of the email notification. You can use the following placeholders:
|
required |
receivers | string[] |
The list of the email recipients. |
required |
ccReceivers | string[] |
The list of the email CC-recipients. |
optional |
shouldSendForResolvedProblems | boolean |
Send ( |
required |
Possible values
Possible values for the type element:
- PAGER_DUTY
- WEBHOOK
- SLACK
- HIPCHAT
- VICTOROPS
- SERVICE_NOW
- XMATTERS
- ANSIBLETOWER
- OPS_GENIE
- JIRA
- TRELLO
The HipChatNotificationConfig object
Configuration of the HipChat notification.
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: 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 |
url | string |
The URL of the HipChat WebHook. This is confidential information, therefore GET requests return this field with the |
optional |
message | string |
The content of the notification message. You can use the following placeholders:
|
required |
Possible values
Possible values for the type element:
- PAGER_DUTY
- WEBHOOK
- SLACK
- HIPCHAT
- VICTOROPS
- SERVICE_NOW
- XMATTERS
- ANSIBLETOWER
- OPS_GENIE
- JIRA
- TRELLO
The JiraNotificationConfig object
Configuration of the Jira notification.
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: 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 |
username | string |
The username of the Jira profile. |
required |
password | string |
The password for the Jira profile. |
optional |
url | string |
The URL of the Jira API endpoint. |
required |
projectKey | string |
The project key of the Jira issue to be created by this notification. |
required |
issueType | string |
The type of the Jira issue to be created by this notification. |
required |
summary | string |
The summary of the Jira issue to be created by this notification. You can use the following placeholders:
|
required |
description | string |
The description of the Jira issue to be created by this notification. You can use same placeholders as in issue summary. |
required |
Possible values
Possible values for the type element:
- PAGER_DUTY
- WEBHOOK
- SLACK
- HIPCHAT
- VICTOROPS
- SERVICE_NOW
- XMATTERS
- ANSIBLETOWER
- OPS_GENIE
- JIRA
- TRELLO
The OpsGenieNotificationConfig object
Configuration of the OpsGenie notification.
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: 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 |
apiKey | string |
The API key to access OpsGenie. |
optional |
domain | string |
The region domain of the OpsGenie. |
required |
message | string |
The content of the message. You can use the following placeholders:
|
required |
Possible values
Possible values for the type element:
- PAGER_DUTY
- WEBHOOK
- SLACK
- HIPCHAT
- VICTOROPS
- SERVICE_NOW
- XMATTERS
- ANSIBLETOWER
- OPS_GENIE
- JIRA
- TRELLO
The PagerDutyNotificationConfig object
Configuration of the PagerDuty notification.
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: 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 |
account | string |
The name of the PagerDuty account. |
required |
serviceApiKey | string |
The API key to access PagerDuty. |
optional |
serviceName | string |
The name of the service. |
required |
Possible values
Possible values for the type element:
- PAGER_DUTY
- WEBHOOK
- SLACK
- HIPCHAT
- VICTOROPS
- SERVICE_NOW
- XMATTERS
- ANSIBLETOWER
- OPS_GENIE
- JIRA
- TRELLO
The ServiceNowNotificationConfig object
Configuration of the ServiceNow notification.
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: 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 |
instanceName | string |
The ServiceNow instance identifier. It refers to the first part of your own ServiceNow URL. This field is mutually exclusive with the url field. You can only use one of them. |
optional |
url | string |
The URL of the on-premise ServiceNow installation. This field is mutually exclusive with the instanceName field. You can only use one of them. |
optional |
username | string |
The username of the ServiceNow account. Make sure that your user account has the |
required |
password | string |
The username to the ServiceNow account |
optional |
message | string |
The content of the ServiceNow description. It is limited to 80 characters. You can use the following placeholders:
|
required |
sendIncidents | boolean |
Send incidents into ServiceNow ITSM ( |
required |
sendEvents | boolean |
Send events into ServiceNow ITOM ( |
required |
Possible values
Possible values for the type element:
- PAGER_DUTY
- WEBHOOK
- SLACK
- HIPCHAT
- VICTOROPS
- SERVICE_NOW
- XMATTERS
- ANSIBLETOWER
- OPS_GENIE
- JIRA
- TRELLO
The SlackNotificationConfig object
Configuration of the Slack notification.
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: 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 |
url | string |
The URL of the Slack WebHook. This is confidential information, therefore GET requests return this field with the |
optional |
channel | string |
The channel (for example, |
required |
title | string |
The content of the message. You can use the following placeholders:
|
required |
Possible values
Possible values for the type element:
- PAGER_DUTY
- WEBHOOK
- SLACK
- HIPCHAT
- VICTOROPS
- SERVICE_NOW
- XMATTERS
- ANSIBLETOWER
- OPS_GENIE
- JIRA
- TRELLO
The TrelloNotificationConfig object
Configuration of the Trello notification.
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: 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 |
applicationKey | string |
The application key for the Trello account. |
required |
authorizationToken | string |
The application token for the Trello account. |
optional |
boardId | string |
The Trello board to which the card should be assigned. |
required |
listId | string |
The Trello list to which the card should be assigned. |
required |
resolvedListId | string |
The Trello list to which the card of the resolved problem should be assigned. |
required |
text | string |
The text of the generated Trello card. You can use the following placeholders:
|
required |
description | string |
The description of the Trello card. You can use same placeholders as in card text. |
required |
Possible values
Possible values for the type element:
- PAGER_DUTY
- WEBHOOK
- SLACK
- HIPCHAT
- VICTOROPS
- SERVICE_NOW
- XMATTERS
- ANSIBLETOWER
- OPS_GENIE
- JIRA
- TRELLO
The VictorOpsNotificationConfig object
Configuration of the VictorOps notification.
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: 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 |
apiKey | string |
The API key for the target VictorOps account. |
optional |
routingKey | string |
The routing key, defining the group to be notified. |
required |
message | string |
The content of the message. You can use the following placeholders:
|
required |
Possible values
Possible values for the type element:
- PAGER_DUTY
- WEBHOOK
- SLACK
- HIPCHAT
- VICTOROPS
- SERVICE_NOW
- XMATTERS
- ANSIBLETOWER
- OPS_GENIE
- JIRA
- TRELLO
The WebHookNotificationConfig object
Configuration of the custom WebHook notification.
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: 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 |
url | string |
The URL of the WebHook endpoint. |
required |
acceptAnyCertificate | boolean |
Accept any, including self-signed and invalid, SSL certificate ( |
required |
payload | string |
The content of the notification message. You can use the following placeholders:
|
required |
headers | HttpHeader[] |
A list of the additional HTTP headers. |
optional |
The HttpHeader object
The HTTP header.
Element | Type | Description | Required |
---|---|---|---|
name | string |
The name of the HTTP header. |
required |
value | string |
The value of the HTTP header. May contain an empty value. Required when creating a new notification. For the Authorization header, GET requests return the If you want update a notification configuration with an Authorization header which you want to remain intact, set the Authorization header with the |
optional |
Possible values
Possible values for the type element:
- PAGER_DUTY
- WEBHOOK
- SLACK
- HIPCHAT
- VICTOROPS
- SERVICE_NOW
- XMATTERS
- ANSIBLETOWER
- OPS_GENIE
- JIRA
- TRELLO
The XMattersNotificationConfig object
Configuration of the xMatters notification.
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: 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 |
url | string |
The URL of the xMatters WebHook. |
required |
acceptAnyCertificate | boolean |
Accept any, including self-signed and invalid, SSL certificate ( |
required |
headers | HttpHeader[] |
A list of the additional HTTP headers. |
optional |
payload | string |
The content of the message. You can use the following placeholders:
|
required |
The HttpHeader object
The HTTP header.
Element | Type | Description | Required |
---|---|---|---|
name | string |
The name of the HTTP header. |
required |
value | string |
The value of the HTTP header. May contain an empty value. Required when creating a new notification. For the Authorization header, GET requests return the If you want update a notification configuration with an Authorization header which you want to remain intact, set the Authorization header with the |
optional |
Possible values
Possible values for the type element:
- PAGER_DUTY
- WEBHOOK
- SLACK
- HIPCHAT
- VICTOROPS
- SERVICE_NOW
- XMATTERS
- ANSIBLETOWER
- OPS_GENIE
- JIRA
- TRELLO
Response format
The NotificationConfigStub object
The short representation of a notification.
Element | Type | Description |
---|---|---|
id | string | The ID of the DESK entity. |
name | string | The name of the DESK entity. |
description | string | A short description of the DESK 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.
POST |
|
Response codes
Code | Description |
---|---|
204 | Validated. The submitted configuration is valid. The response doesn't have a body |
400 | Failed. The input is invalid. |