Create a Service Now Notification
Use this API to create a notification in Junos Space Service Now.
URI
https://[host]/api/juniper/servicenow/notification-management/createNotification (HTTP method = POST)
Consumes
- application/vnd.juniper.servicenow.notification-management.createNotification +xml;version=1
- application/vnd.juniper.servicenow.notification-management.createNotification +json;version=1
Request Elements
Element | Type | Description |
---|---|---|
notification | notification | A Service Now notification |
name | String | Name of the notification |
emails | emails | Collection of e-mail IDs to whom the notification must be flagged |
String | E-mail ID of a user to whom notifications must be flagged | |
snmpTraps | snmpTraps | Collection of SNMP traps to which the notification must be sent |
snmpTrap | snmpTrap | An SNMP trap |
uri | String | URI of the SNMP trap |
href | String | Link to the SNMP trap |
filters | filters | Filter used by the notification to send e-mails or SNMP traps |
deviceGroup | String | Device group used in the filter |
deviceName | String | Device name used in the filter |
hasTheWords | String | String used in the filter An object is filtered and a notification sent when the object contains the words in this element |
doesNotHave | String | Strings used in the filter An object is filtered when the object does not contain the words in this element |
products | String | Products used in the filter |
jmbAttachment | String | Name of the JMB attachment file used to filter |
productsAffected | String | Products used to filter a received intelligence update |
platformType | String | Types of platforms used to filter a received intelligence update |
keywords | String | keywords used to filter a received intelligence update |
softwareVersion | String | Junos OS software version used to filter a received intelligence update |
hardwareVersion | String | Product hardware version used to filter a received intelligence update |
devicesImpacted | String | Devices impacted used to filter a received intelligence update |
connectedMemberName | String | Name of End customer used in the filter |
deviceState | String | State of device used in the filter |
Priority | String | Priority of the incident used in the filter Possible values—None, Critical, High, Medium, and Low |
before | String | Number of days before which expiry of partner’s SSL certificate must be notified Possible values—7 days, 5 days, and 30 days |
frequency | String | Frequency for sending notification about expiry of partner’s SSL certificate Possible values—Weekly and Daily |
trigger | String | Trigger to send e-mail or SNMP traps to users when conditions specified in the filter are met Possible values:
|
domainId | Integer | ID of the domain in which the notification should be created. This is an optional element. If no domain ID is provided, the notification is created in the Global domain. Note: The create request fails if a user does not have access to the Global domain and if no domain ID is providsed with the create request. |
Produces
- application/vnd.juniper.servicenow.notification-management.servicenowmsg +xml;version=1
- application/vnd.juniper.servicenow.notification-management.servicenowmsg +json;version=1
Response Elements
Element | Type | Description |
---|---|---|
msg | String | Status message of the create notification job |
Sample Input
Sample XML Input
<notification> <name>n1</name> <emails> <email>abct@test.net</email> </emails> <snmpTraps> <snmpTrap uri="/api/juniper/servicenow/global-setting-management/snmp-configuration-management /snmpConfiguration/98304" href= "/api/juniper/servicenow/global-setting-management/snmp-configuration-management /snmpConfiguration/98304" /> </snmpTraps> <filters> <deviceName>TEST</deviceName> <serialNumber>12345</serialNumber> <organization uri="/api/juniper/servicenow/organization-management/organization/34635" href= "/api/juniper/servicenow/organization-management/organization/34635"/> <deviceGroup uri="/api/juniper/servicenow/device-group-management/deviceGroup/34636" href= "/api/juniper/servicenow/device-group-management/deviceGroup/34636"/> <priority>Low</priority> </filters> <trigger>POLICY_TRIGGER_NEW_INCIDENT_DETECTED</trigger> <jmbAttachment>true</jmbAttachment> <domainId>10</domainId> </notification>
Sample JSON Input
{ "notification": { "name": "n1", "emails": { "email": "narunkumar@juniper.net" }, "snmpTraps": { "snmpTrap": { "@uri": "/api/juniper/servicenow/global-setting-management/snmp-configuration-management /snmpConfiguration/98304", "@href": "/api/juniper/servicenow/global-setting-management/snmp-configuration-management /snmpConfiguration/98304" } }, "filters": { "deviceName": "TEST", "serialNumber": "12345", "organization": { "@uri": "/api/juniper/servicenow/organization-management/organization/34635", "@href": "/api/juniper/servicenow/organization-management/organization/34635" }, "deviceGroup": { "@uri": "/api/juniper/servicenow/device-group-management/deviceGroup/34636", "@href": "/api/juniper/servicenow/device-group-management/deviceGroup/34636" }, "priority": "Low" }, "trigger": "POLICY_TRIGGER_NEW_INCIDENT_DETECTED", "jmbAttachment": "true", "domainId":"10" } }
Sample Output
Sample XML Output
<servicenowmsg> <msg>Notifications: successfully created </msg> </servicenowmsg>
Sample JSON Output
{ "servicenowmsg": { "msg": "Notifications: successfully created " } }