- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2022 03:12 AM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2022 04:16 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2022 04:16 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2022 04:10 AM
Now my actual requirement as I explained in description , once the instance B calls scripted API in instnace A , firstly I need to get the user ID and then based on this User ID I need to again call the instance B to get the additional details of this user and the process in instance A .
Please let me know how to achieve this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2022 04:12 AM
Hi,
you will have to create some API in instance B to fetch the details
OR
you can use OOB table API on sys_user table to fetch the details
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2022 04:19 AM
please let me know how can I make this GET request from the same scripted API in instance A , to summarize once instance B calls scripted API and passes user ID , how to call the table API in instance B to get additional details from the same scripted API in instance A .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2022 05:10 AM
Hi,
you can consume the instance B API using REST Message in scripted rest api
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader