Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Creating an Advanced Incident Filter

 

Creating an advanced incident filter involves the following APIs:

Encoding PERL File of an Incident Filter

Use this API to encode Perl file containing the filter logic of an advanced incident filter in Junos Space Service Now.

URI

https://[host]/api/juniper/servicenow/incident-filter-management/encodePerlFile -F "fileName=@filename.pl" (HTTP method = POST)

URI Parameters

Element

Type

Required

Description

filename

String

Yes

Name of the Perl script file (*.pl)

Consumes

None

Request Elements

None

Produces

multipart/form-data

Sample Output

Creating the Advanced Incident Filter

Use the createAdvancedFilter API to create the advanced incident filter. You must input the encoded perl script obtained by using the Encoding PERL File of an Incident Filter API.

URI

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

URI Parameters

None

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 advanced incident filter

action

String

Action to be taken on JMBs that match the filter condition and terms

Possible values:

  • Create Incident

  • Do Not Create Incident

advancedFilterAttribute

advancedFilterAttribute

Defines the advanced filter terms and conditions

perlFileContent

String

Perl script providing the logic for filtering JMBs in encoded form

You can obtain the encoded Perl script by using the Encode Perl script API

perlFileName

String

Name of the Perl file

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 advanced filter

id

Integer

ID of the advanced filter

name

String

Name of the advanced filter

type

String

Type of advanced filter

Possible value—Advanced

action

String

Action to be taken on JMBs that match the filter condition and terms

Possible values:

  • Create Incident

  • Do Not Create Incident

createdBy

String

User who created the filter

priority

Integer

Order in which the filter is applied to a JMB

status

String

Status of the filter

Possible values:

  • Enabled—Filter can be applied to a JMB

  • Disabled—Filter cannot be applied to a JMB

advancedFilterAttribute

advancedFilterAttribute

Defines terms and conditions of the advanced filter

inputParams

String

Attributes used in the filter for filtering a JMB

perlFileContent

String

Encoded Perl script providing the logic for filtering JMBs

You can decode the Perl script by using the decodePerlFile API

perlFileName

String

Name of the Perl file

method

String

Methods applicable to the advanced filter

Sample Input

Sample XML Input

Sample JSON Input

Sample Output

Sample XML Output

Sample JSON Output

Decoding Perl File

Use this API to decode Perl file of advanced incident filters in Junos Space Service Now.

URI

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

URI Parameters

None

Consumes

multipart/form-data

Produces

multipart/form-data

Sample Input

Sample Output