Supported Integration Interfaces
Supported Integration Interfaces
Supported Integration Interfaces
Hello,
API Explorer | Scripted REST APIs | Using MID Server and Scripts
| Import/Exports using Transform Maps | Orchestration | IntegrationHub
etc..
Off which, the most common used path is for SOAP/REST APIs which involves
a request and response. ServiceNow uses JSON as a medium of data
transfer from instance to 3rd party resource. Here we shall proceed with
REST API exploration and move on to further articles for integration
techniques.
a. Go to System Web Services > Scripted REST APIs > Create New > Submit.
Remember your Base API path, which helps you later to provide the end point
details at 3rd party (Note: IncidentRx in the screenshot, Rx = receive)
b. Now, create a new resource - use HTTP Method as GET as shown below:
Here, in the above Relative path, you can use unique field from incident, let's
say the sys_id to call a particular incident. To do this, use {custom_sysid}
as a value in the relative path and in the script just modify to include this
value while doing glide record - at line 1 include var incid
= request.pathParams.custom_sysid; and remove the respective line after
while loop and there you go for a specific retrieval (Note: you may use if loop
instead, while loop is used for generalization)
The content shows beside is the GET URL along with the Resource path that
gets auto generated while creating the resource in step above. Once, we get
on with the testing here, we may use the Query parameters for integrating
with 3rd party tools. You can see the request and response formats are
defaulted to JSON format, though you can change based on your 3rd party
tool, this is recommended from ServiceNow.
Finally, you may click on SEND and see the response below on-demand.
Note: If you encounter any error, you may verify the API Path, script and
variable names from incident table.
Once, this testing is done, which means you are ready with basic skill to
integrate with other systems.
We may proceed further with next steps in the Level 2 article. Thank you for
reading out, please leave out your comments and I can improvise the article
for better understanding.