Modify a Basic Auto Submit Filter
Use this API to modify a basic auto submit filter in Junos Space Service Now.
URI
https://[host]/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters /{filterId}/modify (HTTP method = POST)
URI Parameters
Element | Type | Required | Description |
---|---|---|---|
filterd | Integer | Yes | ID of the filter to be modified |
Consumes
application/vnd.juniper.servicenow.autosubmit-filter-management.filter+xml; version=1;charset=UTF-8
application/vnd.juniper.servicenow.autosubmit-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—Basic |
action | String | Action to be taken on incidents that match the filter condition and term criteria Possible values:
|
caseId | String | D of case with which the incident must be associated. Note: This element is required only when the filter action is set to AssociateToAnExistingCase |
termCriteria | String | Criterion for implementing the action defined in the filter Possible values:
|
filterAttributes | filterAttribute | Attributes of the filter |
name | String | Attribute based on which to filter incidents 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, and GreaterThan Note:
|
value | String | Value assigned to the attribute |
Produces
application/vnd.juniper.servicenow.autosubmit-filter-management.filter +xml;version=1
application/vnd.juniper.servicenow.autosubmit-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—Basic |
action | String | Action to be taken on incidents that match the filter conditions and term criteria Possible values:
|
createdBy | String | User who created the filter |
priority | Integer | Order in which the filter is applied to incidents |
status | String | Status of the filter Possible values:
|
termCriteria | String | Criterion for implementing the action defined in the filter Possible values:
|
filterAttribute | String | Terms defined in the filter |
name | String | Attribute based on which to filter a JMB 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, and GreaterThan Note:
|
value | String | Value assigned to the attribute |
method | String | Methods applicable to the filter |
Sample Input
Sample XML Input
<filter> <name>AutoSubmitFilter_2_REST_1</name> <type>Basic</type> <action>DoNotSubmitCase</action> <termCriteria>AND</termCriteria> <filterAttributes> <filterAttribute> <name>DeviceName</name> <condition>Include</condition> <value>fuga</value> </filterAttribute> </filterAttributes> </filter>
Sample JSON Input
{ "filter": { "name": "AutoSubmitFilter_2_REST_1", "type": "Basic", "action": "DoNotSubmitCase", "termCriteria": "AND", "filterAttributes": { "filterAttribute": { "name": "DeviceName", "condition": "Include", "value": "fuga" } } } }
Sample Output
Sample XML Output
<filter uri="/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters/6258696/modify"> <id>6258696</id> <domainId>2</domainId> <name>AutoSubmitFilter_2_REST_1</name> <type>Basic</type> <createdBy>super</createdBy> <priority>2</priority> <status>Disabled</status> <termCriteria>AND</termCriteria> <filterAttribute>Device Name includes fuga </filterAttribute> <method href= "/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters/6258696/modify" /> <method href= "/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters/6258696/enable" /> <method href= "/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters/6258696/disable" /> </filter> = "/api/juniper/servicenow/incident-filter-management/incidentFilters/3670070/disable" /> </filter>
Sample JSON Output
{ "filter": { "id": "6258696", "domainId": "2", "name": "AutoSubmitFilter_2_REST_1", "type": "Basic", "createdBy": "super", "priority": "2", "status": "Disabled", "termCriteria": "AND", "filterAttribute": "Device Name includes fuga", "method": [ { "_href": "/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters/6258696/modify" }, { "_href": "/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters/6258696/enable" }, { "_href": "/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters/6258696/disable" } ], "_uri": "/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters/6258696/modify" } }