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 a Basic Incident Filter

    Use this API to modify a basic 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—Basic

    action

    String

    Action to be taken on JMB

    Possible values:

    • CreateIncident
    • DoNotCreateIncident

    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 JMB matches all the terms defined in the filter
    • OR—Action defined in the filter is applied to an incident when the JMB matches any term defined in the filter

    filterAttributes

    filterAttribute

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

    • 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

    Value assigned to the attribute

    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 collect additional information job

    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 JMBs that match the filter terms

    Possible values:

    • CreateIncident
    • DoNotCreateIncident

    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:

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

    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 JMB matches all the terms defined in the filter
    • OR—Action defined in the filter is applied to an incident when the JMB matches any term defined in the filter

    filterAttribute

    String

    JMB attributes 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:

    • 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

    Value assigned to the attribute

    method

    String

    Methods applicable to the filter

    Sample Input

    Sample XML Input

    <filter>
    <name>test_11</name>
    <type>Basic</type>
    <action>DoNotCreateIncident</action>
    <termCriteria>AND</termCriteria>
    <filterAttributes>
    <filterAttribute>
    <name>Platform</name>
    <condition>DoesNotInclude</condition>
    <value>junos</value>
    </filterAttribute>
    </filterAttributes>
    </filter>
    

    Sample JSON Input

    {
       "filter": {
          "name": "test_11",
          "type": "Basic",
          "action": "DoNotCreateIncident",
          "termCriteria": "AND",
          "filterAttributes": {
             "filterAttribute": {
                "name": "Platform",
                "condition": "DoesNotInclude",
                "value": "junos"
             }
          }
       }
    }
    

    Sample Output

    Sample XML Output

    <filter uri="/api/juniper/servicenow/incident-filter-management/incidentFilters/3670070/modify">
    <id>3670070</id>
    <domainId>2</domainId>
    <name>test_11</name>
    <type>Basic</type>
    <action>DoNotCreateIncident</action>
    <createdBy>super</createdBy>
    <priority>2</priority>
    <status>Enabled</status>
    <termCriteria>AND</termCriteria>
    <filterAttribute>
    Platform includes junos Platform does not include junos Platform does not include junos Platform does not include junos Platform does not include junos
    </filterAttribute>
    <method href= "/api/juniper/servicenow/incident-filter-management/incidentFilters/3670070/modify" />
    <method href= "/api/juniper/servicenow/incident-filter-management/incidentFilters/3670070/enable" />
    <method href= "/api/juniper/servicenow/incident-filter-management/incidentFilters/3670070/disable" />
    </filter>
    
    

    Sample JSON Output

    {
      "filter": {
        "@uri": "/api/juniper/servicenow/incident-filter-management/incidentFilters/689568/modify",
        "id": 689568,
        "domainId": 2,
        "name": "test_11",
        "type": "Basic",
        "action": "DoNotCreateIncident",
        "createdBy": "super",
        "priority": 1,
        "status": "Enabled",
        "termCriteria": "AND",
        "filterAttribute": "Platform does not include junos \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"
          }
        ]
      }
    }
    
     
     

    Modified: 2017-07-18