Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Create a Basic Auto Submit Filter

    Use this API to create a basic auto submit filter in Junos Space Service Now.

    URI

    https://[host]/api/juniper/servicenow/autosubmit-filter-management/createBasicFilter (HTTP method = POST)

    URI Parameters

    None

    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 basic auto submit filter

    action

    String

    Action to be taken on an incident.

    Possible values:

    • SubmitCase
    • DoNotSubmitCase
    • AssociateToAnExistingCase

    caseID

    String

    ID 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:

    • AND—The action defined in the filter is applied to an incident only when the incident matches all the terms defined in the filter
    • OR—The action defined in the filter is applied to an incident when the incident matches any term defined in the filter

    filterAttributes

    filterAttribute

    Attributes defined for filtering an incident

    name

    String

    Name of the incident attribute

    Possible values—EventType, EventSynopsis, Description, DeviceName, Platform, Entity, EventOccuredDate, DeviceIP, and DeviceID

    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:

    • When the name element is set to EventOccuredDate, the possible values for the condition element are Before, After, and On.
    • When the name element is set to DeviceIP, the possible values for the condition element are Is, IsNot, LessThan, and GreaterThan

    value

    String

    Reference value of the attribute to be considered for filtering an incident

    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

    domanId

    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 defined for the filter

    Possible values:

    • SubmitCase
    • DoNotSubmitCase
    • AssociateToAnExistingCase

    caseId

    String

    ID of the case with which the incident should be associated

    Note: This attribute is applicable only when the action is set to AssociateToAnExistingCase

    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:

    • Enabled—The filter can be applied to incidents
    • Disabled—The filter cannot be applied to incidents

    termCriteria

    String

    Criterion for implementing the action defined in the filter

    Possible values:

    • AND—The action defined in the filter is applied to the incident only when the incident matches all the terms defined in the filter
    • OR—The action defined in the filter is applied to the incident only when the incident matches any term defined in the filter

    filterAttribute

    String

    List of attributes defined in the filter

    filterAttributes

    filterAttribute

    Attributes used for filtering an incident

    name

    String

    Name of the filter attribute

    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:

    • When the name element is set to EventOccuredDate, the possible values for the condition element are Before, After, and On.
    • When the name element is set to DeviceIP, the possible values for the condition element are Is, IsNot, LessThan, and GreaterThan

    value

    String

    Reference value of the attribute considered for filtering

    method

    String

    Methods applicable to the filter

    Sample Input

    Sample XML Input

    <filter>
       <name>test_basic_filter</name>
       <action>SubmitCase</action>
       <termCriteria>AND</termCriteria>
       <filterAttributes>
          <filterAttribute>
             <name>EventType</name>
             <condition>Include</condition>
             <value>Memory Consumption</value>
          </filterAttribute>
          <filterAttribute>
             <name>Entity</name>
             <condition>Include</condition>
             <value>re0</value>
          </filterAttribute>
       </filterAttributes>
    </filter>
    

    Sample JSON Input

    {
       "filter": {
          "name": "test_basic_filter",
          "action": "SubmitCase",
          "termCriteria": "AND",
          "filterAttributes": {
             "filterAttribute": [
                {
                   "name": "EventType",
                   "condition": "Include",
                   "value": "Memory Consumption"
                },
                {
                   "name": "Entity",
                   "condition": "Include",
                   "value": "re0"
                }
             ]
          }
       }
    }
    

    Sample Output

    Sample XML Output

    <?xml version="1.0" encoding="UTF-8"?>
    <filter uri="/api/juniper/servicenow/incident-filter-management/createBasicFilter">
       <id>3080192</id>
       <name>test_basic_filter</name>
       <type>Basic</type>
       <action>CreateIncident</action>
       <createdBy>super</createdBy>
       <priority>4</priority>
       <status>Enabled</status>
       <termCriteria>AND</termCriteria>
       <filterAttribute>Event Type includes Memory Consumption Entity includes re0</filterAttribute>
       <filterAttributes>
          <filterAttribute>
             <name>EventType</name>
             <condition>Include</condition>
             <value>Memory Consumption</value>
          </filterAttribute>
          <filterAttribute>
             <name>Entity</name>
             <condition>Include</condition>
             <value>re0</value>
          </filterAttribute>
       </filterAttributes>
       <method href="/api/juniper/servicenow/incident-filter-management/incidentFilters/3080192/modify" />
       <method href="/api/juniper/servicenow/incident-filter-management/incidentFilters/3080192/enable" />
       <method href="/api/juniper/servicenow/incident-filter-management/incidentFilters/3080192/disable" />
    </filter>
    

    Sample JSON Output

    {
      "filter": {
        "@uri": "/api/juniper/servicenow/autosubmit-filter-management/createBasicFilter",
        "id": 703958,
        "domainId": 2,
        "name": "test_basic_filter",
        "type": "Basic",
        "action": "SubmitCase",
        "createdBy": "super",
        "priority": 3,
        "status": "Enabled",
        "termCriteria": "AND",
        "filterAttribute": "Event Type includes Memory Consumption \nEntity includes re0 \n",
        "filterAttributes": {
          "filterAttribute": [
            {
              "name": "EventType",
              "condition": "Include",
              "value": "Memory Consumption"
            },
            {
              "name": "Entity",
              "condition": "Include",
              "value": "re0"
            }
          ]
        },
        "method": [
          {
            "@href": "/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters/703958/modify"
          },
          {
            "@href": "/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters/703958/enable"
          },
          {
            "@href": "/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters/703958/disable"
          }
        ]
      }
    }
    

    Sample XML Input When Action is AssociateToAnExistingCase :

    <filter>
       <name>test_basic_filter_SYNO</name>
       <action>AssociateToAnExistingCase</action>
       <caseId>2015-0224-0037</caseId> 
       <termCriteria>AND</termCriteria>
       <filterAttributes>
          <filterAttribute>
             <name>EventSynopsis</name>
             <condition>Include</condition>
             <value>Daemon </value>
          </filterAttribute>
          <filterAttribute>
             <name>EventSynopsis</name>
             <condition>DoesNotInclude</condition>
             <value>Daemon </value>
          </filterAttribute>
          <filterAttribute>
             <name>EventSynopsis</name>
             <condition>Is</condition>
             <value>Daemon </value>
          </filterAttribute>
          <filterAttribute>
             <name>EventSynopsis</name>
             <condition>IsNot</condition>
             <value>Daemon </value>
          </filterAttribute>
          <filterAttribute>
             <name>EventSynopsis</name>
             <condition>StartsWith</condition>
             <value>Daemon </value>
          </filterAttribute>
    	  <filterAttribute>
             <name>EventSynopsis</name>
             <condition>EndsWith</condition>
             <value>Daemon </value>
          </filterAttribute>
     </filterAttributes>
    </filter>
    

    Modified: 2017-07-18