Designing API interface

yasserbouat
Tera Guru

Hello,

I hope you all re doing great,

I m looking for a course or tutorial to learn how to design an API interface between Servicenow and an external system then implement it , so if you have any ressource please share 

Thanks,

4 REPLIES 4

Tanushree Maiti
Tera Patron

Hi @yasserbouat 

 

With third party you can connect from servicenow using api in several ways like 

  • Scripted Rest API
  • Outbound Web Services (REST / SOAP) 
  • IntegrationHub & Spokes
  • Table API   etc.

Depending wheather you are looking for using low-code tools or writing custom scripts.

 

Check these resources: 

https://www.youtube.com/watch?v=9KvNrFdaPlI

https://www.servicenow.com/docs/r/api-reference/api-implementation-reference.html

https://www.youtube.com/watch?v=7POS69Rcs6g

https://www.youtube.com/watch?v=6IfPC5m9ZxA

https://www.youtube.com/watch?v=xtYjSjkrnBM  

 

 

 

Is it possible to use integration hub and flow designer in ServiceNow to create an Outbound REST action in under 5 minutes!?! In this 'just for fun' video we use a UI action to trigger a flow designer REST step api (via script) to bring back some BAD dad jokes and present them on an incident form
ServiceNow Scripted REST API Demo | ServiceNow integration Examples ---------------------------------------------------------------------------------------------------------------------------- My Exclusive Content: Latest ServiceNow Interview Questions: - https://servicenowspectaculars.com/ ...
In this video, we will explore End-to-End Integration of ServiceNow with 3rd Party Applications by using a Weather API as our example. You'll learn how to connect ServiceNow to an external API, send requests, and extract useful information from the JSON response. We'll walk through step-by-step ...
Is it possible to use integration hub and flow designer in ServiceNow to create an Outbound REST action in under 5 minutes!?! In this 'just for fun' video we use a UI action to trigger a flow designer REST step api (via script) to bring back some BAD dad jokes and present them on an incident form
This video demonstrates inbound integrations in Servicenow using scripted rest APIs. Following use-cases are taken into account: 1. When request/payload contains data for only one record. 2. When request/payload contains data for multiple records. 3. When data for the same incident is sent ...

Vishal Jaswal
Tera Sage

Hello @yasserbouat 

Try below to begin with:

Navigate to All > System Web Services > Outbound > REST Message - Click New

VishalJaswal_0-1792518080485.png


Free REST API to play with: https://reqres.in/ 

VishalJaswal_2-1792518231773.png


Hit Submit and then open the Default GET HTTP Method:

VishalJaswal_3-1792518270513.png



Update the endpoint and add HTTP Headers under HTTP Request tab as shown below:

VishalJaswal_4-1792518323004.png
Hit Save and Under Related Links, click Test:

VishalJaswal_5-1792518396189.png


Now under Related Links, Click Preview Script Usage and copy the code:

VishalJaswal_6-1792518442029.png



Navigate to All > System Definition > Scripts - Background -  paste the code add add below as shown below

gs.print(responseBody);

VishalJaswal_7-1792518560639.png

 

Now you can start modifying the script based upon httpStatus to make it more robust as shown below:

VishalJaswal_8-1792518718486.png

 

 

sanjaygupta
Giga Guru

ServiceNow’s own Now Learning platform is the best place to start, and it is enough to design and build both directions of an integration. Community members recommend this learning order, and the course titles below are the ones they name. Titles change over time, so search Now Learning to confirm them.

  • Take Get Started with Integrations on Now Learning, where several on-demand integration courses are free.
  • Continue with Web Service Integrations, then REST Integration: Create Inbound REST Requests.
  • For receiving calls from the external system, take REST Integration: Create Scripted REST APIs, or the From the Experts: ServiceNow Scripted REST APIs course, where the instructor says to define your requirements as precisely as possible before developing.
  • For calling the external system, practice with REST Messages and the RESTMessageV2 scripting described in the Australia documentation under Scripting outbound REST.
  • Use a free Personal Developer Instance (PDI) to practice. A ServiceNow-to-ServiceNow integration is a good first exercise because it covers both inbound and outbound calls.
  • Take Integration Hub: Introduction last. Community advice is to learn REST first, because Integration Hub is easier once those concepts are clear.

For the design stage, agree the data fields, authentication method (basic or OAuth 2.0), error handling and retry behavior with the external team before you build. The Australia documentation covers inbound and outbound web services under the API reference, including outbound REST authentication.

Sources: