Get Information About an Incident Filter
Use this API to retrieve information about an incident filter in Junos Space Service Now.
URI
https://[host]/api/juniper/servicenow/incident-filter-management/incidentFilters /{filterId} (HTTP method = GET)
URI Parameters
Element | Type | Required | Description |
---|---|---|---|
filterId | Integer | Yes | ID of the incident filter for which information is to be retrieved |
Consumes
None
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 |
domanId | Integer | ID of the domain to which the filter is assigned |
name | String | Name of the filter |
type | String | Type of filter Possible values:
|
action | String | Action to be taken on JMBs that satisfy the filter terms and conditions Possible values:
|
createdBy | String | User who created the filter |
lastUpdated | String | Date and time (in yyyy-mm-dd hh:mm:ss timezone) when the filter was last updated |
Created | String | Date and time (in yyyy-mm-dd hh:mm:ss timezone) when the filter was created |
priority | Integer | Order in which the filter is applied to JMBs. |
status | String | Status of the filter Possible values:
|
advancedFilterAttribute | advancedFilterAttribute | Attributes and conditions defining the filter Note: advancedFilterAttribute is applicable only for advanced incident filters |
inputParams | String | JMB parameters used to define the filter terms Note: inputParams is applicable only for advanced incident filters |
perlFileContent | String | Perl script defining the filter logic Note: perlFileContent is applicable only for advanced incident filters |
perlFileName | String | Name of the Perl script file Note: perlFileName is applicable only for advanced incident filters |
termCriteria | String | Criterion for implementing the action defined in the filter Possible values:
|
filterAttribute | String | List of JMB attributes used in the filter |
filterAttributes | filterAttribute | JMB attributes for filtering |
name | String | Name of the filter attribute Possible values—EventType, EventSynopsis, Description, DeviceName, Platform, Entity, EventOccuredDate, and DeviceIP |
condition | String | Condition of the filter term A filter attribute condition defines the conditions such as words that can be present or not present in an event synopsis, the date before or after which the event should occur, or specific platforms. Possible values—Include, DoesNotInclude, Is, IsNot, Before, After, On, StartsWith, EndsWith, LessThan, GreaterThan Note:
|
value | String | Reference value of the attribute to be considered for filtering a JMB |
method | String | Methods applicable to the filter |
Sample Output When a Basic Incident Filter is Retrieved
Sample XML Output
<filter uri="/api/juniper/servicenow/incident-filter-management/incidentFilters/689568"> <id>689568</id> <domainId>2</domainId> <name>test</name> <type>Basic</type> <action>DoNotCreateIncident</action> <createdBy>super</createdBy> <lastUpdated>2017-06-07 05:05:26 UTC</lastUpdated> <created>2017-06-07 05:05:26 UTC</created> <priority>1</priority> <status>Enabled</status> <termCriteria>AND</termCriteria> <filterAttribute>Event Synopsis is not as </filterAttribute> <method href= "/api/juniper/servicenow/incident-filter-management/incidentFilters/689568/modify" /> <method href= "/api/juniper/servicenow/incident-filter-management/incidentFilters/689568/enable" /> <method href= "/api/juniper/servicenow/incident-filter-management/incidentFilters/689568/disable" /> </filter>
Sample JSON Output
{ "filter": { "@uri": "/api/juniper/servicenow/incident-filter-management/incidentFilters/689568", "id": 689568, "domainId": 2, "name": "test", "type": "Basic", "action": "DoNotCreateIncident", "createdBy": "super", "lastUpdated": "2017-06-07 05:05:26 UTC", "created": "2017-06-07 05:05:26 UTC", "priority": 1, "status": "Enabled", "termCriteria": "AND", "filterAttribute": "Event Synopsis is not as \n", "method": [ { "@href": "/api/juniper/servicenow/incident-filter-management/incidentFilters/689568/modify" }, { "@href": "/api/juniper/servicenow/incident-filter-management/incidentFilters/689568/enable" }, { "@href": "/api/juniper/servicenow/incident-filter-management/incidentFilters/689568/disable" } ] } }
Sample Output When an Advanced Incident Filter is Retrieved
Sample XML Output
<filter uri="/api/juniper/servicenow/incident-filter-management/incidentFilters/703798"> <id>703798</id> <domainId>2</domainId> <name>Advance</name> <type>Advanced</type> <action>CreateIncident</action> <createdBy>super</createdBy> <lastUpdated>2017-06-14 09:41:26 UTC</lastUpdated> <created>2017-06-14 09:41:26 UTC</created> <priority>3</priority> <status>Enabled</status> <advancedFilterAttribute> <inputParams> eventType:deviceHostName:problemSynopsis:problemDescription:osPlatform :entity:junosVersion:eventTime:deviceId </inputParams> <perlFileContent> IyEvdXNyL ... lIjsNCn0NCg0KDQo=</perlFileContent> <perlFileName>advance_filters.pl</perlFileName> </advancedFilterAttribute> <method href= "/api/juniper/servicenow/incident-filter-management/incidentFilters/703798/modify" /> <method href= "/api/juniper/servicenow/incident-filter-management/incidentFilters/703798/enable" /> <method href= "/api/juniper/servicenow/incident-filter-management/incidentFilters/703798/disable" /> </filter>
Sample JSON Output
{ "filter": { "@uri": "/api/juniper/servicenow/incident-filter-management/incidentFilters/703798", "id": 703798, "domainId": 2, "name": "Advance", "type": "Advanced", "action": "CreateIncident", "createdBy": "super", "lastUpdated": "2017-06-14 09:41:26 UTC", "created": "2017-06-14 09:41:26 UTC", "priority": 3, "status": "Enabled", "advancedFilterAttribute": { "inputParams": "eventType:deviceHostName:problemSynopsis:problemDescription:osPlatform :entity:junosVersion:eventTime:deviceId", "perlFileContent": "IyEvdXN ... 0NCg0KDQo=", "perlFileName": "advance_filters.pl" }, "method": [ { "@href": "/api/juniper/servicenow/incident-filter-management/incidentFilters/703798/modify" }, { "@href": "/api/juniper/servicenow/incident-filter-management/incidentFilters/703798/enable" }, { "@href": "/api/juniper/servicenow/incident-filter-management/incidentFilters/703798/disable" } ] } }