Modify an Advanced Incident Filter
Use this API to modify an advanced incident filter in Junos Space Service Now.
URI
https://[host]/api/juniper/servicenow/incident-filter-management/incidentFilters /{filterId}/modify (HTTP method = POST)
URI Parameters
Element | Type | Required | Description |
---|---|---|---|
filterId | Integer | Yes | ID of the incident filter to be modified |
Consumes
application/vnd.juniper.servicenow.incident-filter-management.filter+xml; version=1;charset=UTF-8
application/vnd.juniper.servicenow.incident-filter-management.filter+json; version=1;charset=UTF-8
Request Elements
Element | Type | Description |
---|---|---|
name | String | Name of the filter |
type | String | Type of the filter Possible value—Advanced |
action | String | Action to be taken on JMBs that match the filter condition and terms Possible values:
|
termCriteria | String | Criterion for implementing the action defined in the filter Possible values:
|
advancedFilterAttribute | advancedFilterAttribute | Attributes defined in the filter |
inputParams | String | Attribute based on which to filter JMB |
perlFileContent | String | Encoded Perl script defining the filter logic |
perlFileName | String | Name of the Perl file |
Produces
application/vnd.juniper.servicenow.incident-filter-management.filter+xml;version=1
application/vnd.juniper.servicenow.incident-filter-management.filter+json;version=1
Response Elements
Element | Type | Description |
---|---|---|
uri | String | URI of the filter |
id | Integer | ID of the filter |
domainId | Integer | ID of the domain to which the filter is assigned |
name | String | Name of the filter |
type | String | Type of filter Possible value—Advanced |
action | String | Action to be taken on JMBs that match the filter condition and terms Possible values:
|
createdBy | String | User who created the filter |
priority | Integer | Order in which the filter is applied to JMBs |
status | String | Status of the filter Possible values:
|
advancedFilterAttribute | advancedFilterAttribute | Attributes of the filter |
inputParams | String | Attribute based on which to filter JMB Possible values—EventType, EventSynopsis, JunosOSVersion, Description, DeviceName, Platform, Entity, EventOccuredDate, DeviceIP |
perlFileContent | String | Encoded Perl script defining the filter logic |
perlFileName | String | Name of the Perl file |
method | String | Methods applicable to the filter |
Sample Input
Sample XML Input
<filter> <name>adv_filter_1</name> <type>Advanced</type> <action>DoNotCreateIncident</action> <termCriteria>AND</termCriteria> <advancedFilterAttribute> <inputParams>eventType:deviceHostName:problemSynopsis:problemDescription:osPlatform: entity:junosVersion:eventTime</inputParams> <perlFileContent>IyEvdXNyL ... w0KfQ0K</ perlFileContent> <perlFileName>test_100.pl</perlFileName> </advancedFilterAttribute> </filter>
Sample JSON Input
{ "filter": { "name": "adv_filter_1", "type": "Advanced", "action": "DoNotCreateIncident", "termCriteria": "AND", "advancedFilterAttribute": { "inputParams": "eventType:deviceHostName:problemSynopsis:problemDescription:osPlatform :entity:junosVersion:eventTime", "perlFileContent": "IyEvdXNyL ... w0KfQ0K", "perlFileName": "test_100.pl" } } }
Sample Output
Sample XML Output
<filter uri="/api/juniper/servicenow/incident-filter-management/incidentFilters/3637283/modify"> <id>3637283</id> <domainId>2</domainId> <name>adv_filter_1</name> <type>Advanced</type> <action>DoNotCreateIncident</action> <createdBy>super</createdBy> <priority>3</priority> <status>Enabled</status> <advancedFilterAttribute> <inputParams> eventType:deviceHostName:problemSynopsis:problemDescription:osPlatform:entity: junosVersion:eventTime </inputParams> <perlFileContent> SXlFdm ... tmUTBL </perlFileContent> <perlFileName>test_100.pl</perlFileName> </advancedFilterAttribute> <method href= "/api/juniper/servicenow/incident-filter-management/incidentFilters/3637283/modify" /> <method href= "/api/juniper/servicenow/incident-filter-management/incidentFilters/3637283/enable" /> <method href= "/api/juniper/servicenow/incident-filter-management/incidentFilters/3637283/disable" /> </filter>
Sample JSON Output
{ "filter": { "id": "3637283", "domainId": "2", "name": "adv_filter_1", "type": "Advanced", "action": "DoNotCreateIncident", "createdBy": "super", "priority": "3", "status": "Enabled", "advancedFilterAttribute": { "inputParams": "eventType:deviceHostName:problemSynopsis:problemDescription:osPlatform:entity: junosVersion:eventTime", "perlFileContent": "SXlFdm ... tmUTBL", "perlFileName": "test_100.pl" }, "method": [ { "_href": "/api/juniper/servicenow/incident-filter-management/incidentFilters/3637283/modify" }, { "_href": "/api/juniper/servicenow/incident-filter-management/incidentFilters/3637283/enable" }, { "_href": "/api/juniper/servicenow/incident-filter-management/incidentFilters/3637283/disable" } ], "_uri": "/api/juniper/servicenow/incident-filter-management/incidentFilters/3637283/modify" } }