How to trigger Outbound GET REST API if there is an Inbound call

Mrman
Tera Guru

Hi All,

My use case requires to call external REST API from ServiceNow and the get additional field details when that External system makes a call to  ServiceNow by passing some basic details of the user.  For example, the 3rd party system trigger a call to Service Now when they hire a new candidate in their system and pushes the ID of that user.  Once the initial call is made, based on that User ID they pass we need to go and GET the additional field details like their First name , last name , email, etc...and store in a table.

Please let me know possible solutions to achieve this in Service Now using REST API and our 3rd party system supports REST API with JSON.

 

@Ankur Bawiskar 

1 ACCEPTED SOLUTION

Hi,

Example

1) create scripted REST API in instance B

2) now instance A will call that

3) in the scripted REST API created in instance B do whatever processing you want

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

14 REPLIES 14

Ok thanks, will try this and let you know .

@Mrman 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar Could you let me know how can I call Scripred rest API of other service now instance from one instance . I am only able to use REST API explorer but not able to find a way scripted REST API from Service now instance.

Hi,

just like you call any external API using REST Message; same thing you need to use

http://servicenow-docs.readthedocs.io/en/latest/REST_Messages/

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Priyanka Jain2
Tera Contributor

HelpFul