Utilize External API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2022 12:36 PM
Hello,
I am new to ServiceNow an am still getting familiar with much of its out of box functionalities. I have been asked to use the other company's API to gather data that we want, and place it in an import table. I fumbled around with Scripted REST API for like 2 hours before I realized it isn't for accessing external data. Now I am wondering how I can submit an API request to the company in ServiceNow that contains login credentials in the header.
I have successfully scripted an API for fetching data in JavaScript in a personal project, so I have an idea on how to script another. But I am also wondering where I should even place that script in ServiceNow.
Can somebody please point me in the right direction?
Thank you!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2022 07:20 AM
It depends on how you are wanting to retrieve the data from the external system via REST message -- is it on a scheduled basis, on-demand, etc.?
Regardless you will likely be using the RESTMessageV2 API in your script, related documentation here.
If this answer is helpful please mark correct and helpful!
Regards,
Christopher Perry
Regards,
Chris Perry