- 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 03:17 AM
Hi,
you can create Scripted REST API
1) 3rd party would consume it and send the user details in JSON format
2) once it reaches ServiceNow you can do your processing i.e. invoke some other API if you wish
OR
you can also invoke that API using after insert BR on sys_user table if they are going to create users.
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 03:35 AM
Thanks
Please let me know if I can call another REST message using GET method from the initial Scripted REST API whenever 3rd party call it and once we get response can I parse that JSON and process it for submitting a record producer ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2022 03:50 AM
Hi,
why not.
yes in Scripted REST API you can call another API, parse and do processing and submit record producer
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 03:56 AM
Thanks , for testing can I try this scenario between two Service Now instances. Like one instance pushing the ID initially to another instance and then based on that other ID other instance invoke GET call .
Will creating the Scripted API in the First instance work ?