How to GET information from a web page using Scripted REST Api ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2023 09:11 PM
Hello community,
I have a simple requirement where I have to get information from a web page using scripted rest API. The webpage contains random state names with state id's and I have to GET only particular state names of some id's.
So, from the above webpage which is having state id's and names I have to GET only some state names of particular state id's. Is this possible using scripted rest api or using integration hub ?
Please guide me to any related links or video that gives solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2023 09:45 PM - edited 02-15-2023 09:46 PM
Hello @Sai Pavan1
Scripted REST APIs are used for Inbound integrations when external application make calls to ServiceNow for the data. In your requirement, you have to make calls to the external application to get the data so I would suggest you use Outbound REST Message and create a GET Request method accordingly to retrieve the data. The following documentation will guide how to set up the outbound REST message
Video reference links
What is Outbound REST Integration in ServiceNow?
If I could help you with my response you can mark it as helpful and correct as it benefits future viewers
Thanks,
Sai Kumar B
Community Rising Star 2023 & 2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2023 08:01 PM
Hello @Sai Kumar B,
Thanks for the reply. As per your suggestion, Can we use the REST message without any authentication ? The webpage that I mentioned is not providing any OAUTH provider details like Token URL, Authorization URL, Client ID and Client Secret. It is just a random webpage available.
So in this scenario to get those particular state names can we proceed with REST message ? or is there any other way to do this ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2023 08:15 AM - edited 02-21-2023 08:17 AM
If the webpage you mentioned provide free information without authentication. For public web services that do not require authentication, set the Authentication type field of your outbound REST message to No authentication.
Reference - Outbound REST Integrations
If I could help you with my response you can mark it as helpful and correct as it benefits future viewers
Thanks,
Sai Kumar B
Community Rising Star 2023 & 2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2023 07:22 AM
If I could help you with my response you can mark it as helpful and correct as it benefits future viewers
Thanks,
Sai Kumar B
Community Rising Star 2023 & 2022