Web Service
The entry point for a Process - you would build one endpoint per process. Once connected, messages are guided to the integration based on the unique combination of authentication user & endpoint.
Last updated
The entry point for a Process - you would build one endpoint per process. Once connected, messages are guided to the integration based on the unique combination of authentication user & endpoint.
Last updated
In native ServiceNow, navigate to System Web Services > Scripted Web Services > Scripted REST APIs. Click New.
The Scripted REST Service fields to be configured are as follows:
#
Field
Description
Value
1
Name
The name of the API. Appears in API documentation.
<Your Name>
2
API ID
The API identifier used to distinguish this API in URI paths. Must be unique within API namespace.
Automatically populated
*
API namespace
The namespace the API belongs to. The value depends on the current application scope.
Automatically populated
*
Base API path
The base API path (URI) to access this API.
Automatically populated (after 'Save')
The top section of your Scripted REST Service record should look like this:
3) Save the record.
Click on the 'Security' tab and configure the fields as follows:
#
Field
Description
Value
4
Default ACLs
The ACLs to enforce when accessing resources. Individual resources may override this value.
[Blank]
Your 'Security' tab should look like this:
Save the record.
Navigate to the Resources Related List. Click New.
The 'Scripted REST Resource' fields to be configured are as follows:
#
Field
Description
Value
5
Name
The name of this API resource. Appears in API documentation.
<Your Name>
6
HTTP method
The HTTP method that maps to this resource.
'POST'
*
Relative path
The path of this resource relative to the base API path. Can contain templatized path parameters such as /{id}.
'/' (Automatically populated)
7
Script
The script that implements the resource.
Replace the contents of the script field with your REST API code, substituting your Process API name (see below). E.g. var helper = new x_snd_eb.RestHelper('incident_guide');
*These fields are automatically populated.
The code in the Script field should look like this:
In the RestHelper function, change the value of the Process API name being called to match yours (e.g. 'incident_guide'). By wrapping the code in console, we give context to Activity Log and prevent multiple database updates.
The top section of your Scripted REST Resource should look like this:
Click on the 'Security' tab and configure the fields as follows:
#
Field
Description
Value
8
Requires ACL authorization
Enforce ACLs when this resource is accessed.
<false>
Your 'Security' tab should look like this:
Click on the 'Content Negotiation' tab and configure the fields as follows:
#
Field
Description
Value
9
Override supported request formats
Check to customize the request media types supported by this resource.
<true>
10
Supported request formats
Comma-delimited list of media types this resource can consume.
*
Your 'Content Negotiation' tab should look like this:
11) Click Submit.
With the introduction of the Packager feature, if you want the Web Service to be included in the packaged update set, you will need to update the value of the REST Service field on the Process record with the name of your Scripted REST Service. This will enable the Packager to pick it up.
Whilst still in native ServiceNow, navigate to [ws] Unifi > Configuration > Processes.
Click to open < Your Process >.
12) Update the value in the REST Service field with < Your Scripted REST Service > (as created above).
13) Click Update.
We will now move back to the Unifi Integration Designer window to configure the Integration.