Edit Filter and Action of a Notification
Use this API to edit the filters and actions of a Service Now notification.
URI
https://[host]//api/juniper/servicenow/notification-management/notifications/{id}/ editFilterAndAction (HTTP method = PUT)
URI Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | Integer | Yes | ID of the Service now notification for which filters and action must be edited |
Consumes
application/vnd.juniper.servicenow.notification-management.editFiltersAndActions +xml;version=1
application/vnd.juniper.servicenow.notification-management.editFiltersAndActions +json;version=1
Request Elements
Element | Type | Description |
---|---|---|
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 |
organization | String | Organization used in the filter |
serialNumber | String | Serial number of the device used in the filter |
deviceState | String | Device state 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 |
priority | String | Priority of the incident used in the filter Possible values—None, Critical, High, Medium, and Low |
jmbAttachment | String | Name of the JMB attachment file used in the filter |
intelligenceUpdateType | String | Type of intelligence update used in the filter |
productsAffected | String | Products used to filter a received intelligence update |
products | String | Products used in the filter |
platformType | String | Types of platforms used to filter a received intelligence update |
keywords | String | Types of platforms used to filter a received intelligence update |
softwareVersion | String | keywords used to filter a received intelligence update |
hardwareVersion | String | Junos OS software version used to filter a received intelligence update |
devicesImpacted | String | Product hardware version used to filter a received intelligence update |
connectedMemberName | String | Devices impacted used to filter a received intelligence update |
biosStatus | String | BIOS status used to filter BIOS information updates Possible values:
|
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—Weekly and Daily |
name | String | Name of the notification |
owner | String | User to whom the notification is assigned for ownership |
status | String | Status of the notification policy Possible Values
|
trigger | String | Trigger to send e-mail or SNMP traps to users when conditions specified in the filter are met Possible values:
|
domain | String | Domain to which the notification is assigned |
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 edit filter and actions job |
Sample Input
Sample XML Input
<notification> <emails> <email>narunkumar@juniper.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>Complex</priority> </filters> <jmbAttachment>empty</jmbAttachment> </notification>
Sample JSON Input
{ "notification": { "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": "Complex" }, "jmbAttachment": "empty" } }
Sample Output
Sample XML Output
<servicenowmsg> <msg>Notifications: successfully edited </msg> </servicenowmsg>
Sample JSON Output
{ “servicenowmsg”: { “msg” : “Notifications: successfully edited” } }