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:
Created
Read Only:true
-
description:
string
Title:
Description
-
id:
integer
Title:
ID
Read Only:true
-
messages:
object Messages
Title:
Messages
Optional custom messages for notification template. -
modified:
string
Title:
Modified
Read Only:true
-
name(required):
string
Title:
Name
Minimum Length:1
Maximum Length:512
-
notification_configuration:
object Notification configuration
Title:
Notification configuration
-
notification_type(required):
string
Title:
Notification type
Allowed Values:[ "email", "grafana", "irc", "mattermost", "pagerduty", "rocketchat", "slack", "twilio", "webhook" ]
-
organization(required):
integer
Title:
Organization
- related: string
-
summary_fields:
string
Title:
Summary fields
Read Only:true
-
type:
string
Title:
Type
Read Only:true
-
url:
string
Title:
Url
Read Only:true
Nested Schema : Messages
Type:
object
Title:
Messages
Optional custom messages for notification template.
Default Value:
{
}
Nested Schema : Notification configuration
Type:
object
Title:
Notification configuration
Response
Supported Media Types
- application/json
201 Response
Root Schema : NotificationTemplate
Type:
Show Source
object
-
created:
string
Title:
Created
Read Only:true
-
description:
string
Title:
Description
-
id:
integer
Title:
ID
Read Only:true
-
messages:
object Messages
Title:
Messages
Optional custom messages for notification template. -
modified:
string
Title:
Modified
Read Only:true
-
name(required):
string
Title:
Name
Minimum Length:1
Maximum Length:512
-
notification_configuration:
object Notification configuration
Title:
Notification configuration
-
notification_type(required):
string
Title:
Notification type
Allowed Values:[ "email", "grafana", "irc", "mattermost", "pagerduty", "rocketchat", "slack", "twilio", "webhook" ]
-
organization(required):
integer
Title:
Organization
- related: string
-
summary_fields:
string
Title:
Summary fields
Read Only:true
-
type:
string
Title:
Type
Read Only:true
-
url:
string
Title:
Url
Read Only:true
Nested Schema : Messages
Type:
object
Title:
Messages
Optional custom messages for notification template.
Default Value:
{
}
Nested Schema : Notification configuration
Type:
object
Title:
Notification configuration