Create a Notification Template for an Inventory Source
post
/api/v2/inventory_sources/{id}/notification_templates_error/
Make a POST request to this resource with the following notification template fields to create a new notification template associated with this inventory source.
name: Name of this notification template. (string, required)description: Optional description of this notification template. (string, default="")organization: (id, required)notification_type: (choice, required)email: Emailgrafana: Grafanairc: IRCmattermost: Mattermostpagerduty: Pagerdutyrocketchat: Rocket.Chatslack: Slacktwilio: Twiliowebhook: Webhook
notification_configuration: (json, default={})messages: Optional custom messages for notification template. (json, default={'started': None, 'success': None, 'error': None, 'workflow_approval': None})
Add Notification Templates for an Inventory Source:
Make a POST request to this resource with only an id field to associate an
existing notification template with this inventory source.
Remove Notification Templates from this Inventory Source:
Make a POST request to this resource with id and disassociate fields to
remove the notification template from this inventory source
without deleting the notification template.
Request
Supported Media Types
- application/json
Path Parameters
Root Schema : NotificationTemplate
Type:
Show Source
object-
created:
string
Title:
CreatedRead Only:true -
description:
string
Title:
Description -
id:
integer
Title:
IDRead Only:true -
messages:
object Messages
Title:
MessagesOptional custom messages for notification template. -
modified:
string
Title:
ModifiedRead Only:true -
name(required):
string
Title:
NameMinimum Length:1Maximum Length:512 -
notification_configuration:
object Notification configuration
Title:
Notification configuration -
notification_type(required):
string
Title:
Notification typeAllowed Values:[ "email", "grafana", "irc", "mattermost", "pagerduty", "rocketchat", "slack", "twilio", "webhook" ] -
organization(required):
integer
Title:
Organization - related: string
-
summary_fields:
string
Title:
Summary fieldsRead Only:true -
type:
string
Title:
TypeRead Only:true -
url:
string
Title:
UrlRead Only:true
Nested Schema : Messages
Type:
objectTitle:
MessagesOptional custom messages for notification template.
Default Value:
{
}Nested Schema : Notification configuration
Type:
objectTitle:
Notification configurationResponse
Supported Media Types
- application/json
201 Response
Root Schema : NotificationTemplate
Type:
Show Source
object-
created:
string
Title:
CreatedRead Only:true -
description:
string
Title:
Description -
id:
integer
Title:
IDRead Only:true -
messages:
object Messages
Title:
MessagesOptional custom messages for notification template. -
modified:
string
Title:
ModifiedRead Only:true -
name(required):
string
Title:
NameMinimum Length:1Maximum Length:512 -
notification_configuration:
object Notification configuration
Title:
Notification configuration -
notification_type(required):
string
Title:
Notification typeAllowed Values:[ "email", "grafana", "irc", "mattermost", "pagerduty", "rocketchat", "slack", "twilio", "webhook" ] -
organization(required):
integer
Title:
Organization - related: string
-
summary_fields:
string
Title:
Summary fieldsRead Only:true -
type:
string
Title:
TypeRead Only:true -
url:
string
Title:
UrlRead Only:true
Nested Schema : Messages
Type:
objectTitle:
MessagesOptional custom messages for notification template.
Default Value:
{
}Nested Schema : Notification configuration
Type:
objectTitle:
Notification configuration