Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Create an Advanced Auto Submit Filter

 

Creating an advanced auto submit filter involves the following APIs:

Encoding PERL File of an Auto Submit Filter

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

URI

https://[host]/api/juniper/servicenow/autosubmit-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)to be encoded

Consumes

None

Request Elements

None

Produces

multipart/form-data

Sample Output

Creating an Advanced Auto Submit Filter

Use the createAdvancedFilter API to create an advanced auto submit filter. You must input the encoded perl script obtained by using the encodePerlFile API.

For information about encoding a Perl file, see Encoding PERL File of an Auto Submit Filter.

URI

https://[host]/api/juniper/servicenow/autosubmit-filter-management/createAdvancedFilter (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 advanced auto submit filter

action

String

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

Possible values:

  • SubmitCase

  • DoNotSubmitCase

  • AssociateToAnExistingCase

advancedFilterAttribute

advancedFilterAttribute

Defines the advanced filter terms and conditions

perlFileContent

String

Perl script, in encoded form, providing the logic for filtering incidents

You can obtain the encoded Perl script by using the encodePerlScript 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 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 incidents that match the filter condition and terms

Possible values:

  • SubmitCase

  • DoNotSubmitCase

  • 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—Filter can be applied to an incident

  • Disabled—Filter cannot be applied to an incident

advancedFilterAttribute

advancedFilterAttribute

Defines terms and conditions of the advanced filter

inputParams

String

Attributes used in the filter for filtering an incident

perlFileContent

String

Encoded Perl script providing the logic for filtering incidents

You can decode the Perl script by using the Decode Perl script 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 an auto submit filter in Junos Space Service Now.

URI

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

URI Parameters

None

Consumes

multipart/form-data

Produces

multipart/form-data

Sample Input

Sample Output