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

    Modify an Advanced Auto Submit Filter

    Use this API to modify an advanced 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

    filterId

    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—Advanced

    action

    String

    Action to be taken on the incident

    Possible values:

    • SubmitCase
    • DoNotSubmitCase
    • AssociateToAnExistingCase

    termCriteria

    String

    Criterion for implementing the action defined in the filter

    Possible values:

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

    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, and DeviceIP

    perlFileContent

    String

    Encoded Perl script defining the filter logic.

    You can encode the Perl file by using the encodePerlFile API.

    perlFileName

    String

    Name of the Perl file

    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—Avanced

    action

    String

    Action to be taken on incidents that match the filter terms

    Possible values:

    • SubmitCase
    • DoNotSubmitCase
    • AssociateToAnExistingCase

    createdBy

    String

    User who created the filter

    priority

    Integer

    Order in which the filter is applied

    status

    String

    Status of the filter

    Possible values:

    • Enabled—Filter can be applied to incidents
    • Disabled—Filter cannot be applied to incidents

    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, and DeviceIP

    perlFileContent

    String

    Encoded Perl script defining the filter logic

    You can encode the Perl file by using the encodePerlFile API

    perlFileName

    String

    Name of the Perl file

    method

    String

    Methods applicable to the filter

    Sample Input

    Sample XML Input

    <filter>
    <name>adv_filter_100_REST_1</name>
    <type>Advanced</type>
    <action>DoNotSubmitCase</action>
    <termCriteria>AND</termCriteria>
    <advancedFilterAttribute>
    <inputParams>eventType:deviceHostName:problemSynopsis:problemDescription:osPlatform:entity :junosVersion:eventTime</inputParams>
    <perlFileContent>IyEvdXNyL2Jp ...  TEiOw0KfQ0K </perlFileContent>
    <perlFileName>test_100.pl</perlFileName>
    </advancedFilterAttribute>
    </filter>
    

    Sample JSON Input

    {
       "filter": {
          "name": "adv_filter_100_REST_1",
          "type": "Advanced",
          "action": "DoNotSubmitCase",
          "termCriteria": "AND",
          "advancedFilterAttribute": {
             "inputParams": "eventType:deviceHostName:problemSynopsis:problemDescription:osPlatform :entity:junosVersion:eventTime",
             "perlFileContent": "EvdXNyL2Jp ...  TEiOw0KfQ0K,
             "perlFileName": "test_100.pl"
          }
       }
    }
    

    Sample Output

    Sample XML Output

    <filter uri="/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters/6815746/modify">
    <id>6815746</id>
    <domainId>2</domainId>
    <name>adv_filter_100_REST_1</name>
    <type>Advanced</type>
    <createdBy>super</createdBy>
    <priority>3</priority>
    <status>Disabled</status>
    <advancedFilterAttribute>
    <inputParams>
    eventType:deviceHostName:problemSynopsis:problemDescription:osPlatform:entity :junosVersion:eventTime
    </inputParams>
    <perlFileContent>
    SXlFdmRYTnlMMk ... pFaU93MEtmUTBL
    </perlFileContent>
    <perlFileName>test_100.pl</perlFileName>
    </advancedFilterAttribute>
    <method href= "/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters/6815746/modify" />
    <method href= "/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters/6815746/enable" />
    <method href= "/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters/6815746/disable" />
    </filter>
    

    Sample JSON Output

    {
       "filter": {
          "id": "6815746",
          "domainId": "2",
          "name": "adv_filter_100_REST_1",
          "type": "Advanced",
          "createdBy": "super",
          "priority": "3",
          "status": "Disabled",
          "advancedFilterAttribute": {
             "inputParams": "eventType:deviceHostName:problemSynopsis:problemDescription:osPlatform:entity :junosVersion:eventTime",
             "perlFileContent": "FaU93MEtmUTBL",
             "perlFileName": "test_100.pl"
          },
          "method": [
             {
                "_href": "/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters/6815746/modify"
             },
             {
                "_href": "/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters/6815746/enable"
             },
             {
                "_href": "/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters/6815746/disable"
             }
          ],
          "_uri": "/api/juniper/servicenow/autosubmit-filter-management/autosubmitFilters/6815746/modify"
       }
    }
    x

    Modified: 2017-07-18