Data source of type REST (Integration Hub)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 03:13 AM
Hi Team,
We are trying to fetch repo details from GitHub and store in 'X' table in ServiceNow. For this we are trying to use Integration Hub ETL.
Created a data source of type REST (Integration Hub) and have created a Request action in which we have the REST step. We were told that we might need to fetch info from more than one org. In the resource path I can only pass one org name at once.
If there will be 5 orgs, I'll need to loop through these org names. How do I achieve this using single data source?
Thanks in Advance
- Labels:
-
Architect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 05:00 PM - edited 04-02-2025 05:04 PM
You can switch type to Custom (Load by Script) in which case you can be as flexible as you need.
Though you would most likely need to switch to regular Flows, Sub-flows or REST Messages to execute the REST calls.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 03:15 AM
@-O- Thanks for your response.
I tried Custom(Load by script). But when I'm trying to test load records, it says success but 0 records inserted(image attached).
In logs when I see, it says "Error: 403 - {"message":"Although you appear to have the correct authorization credentials, the organization has an IP allow list enabled, and your IP address is not permitted to access this resource.","documentation_url":"https://docs.github.com/rest/repos/repos#list-organization-repositories","status":"403"}"
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 01:08 PM
I guess the error message is quite clear.
You should contact the owner of the repo that refuses connection and ask them to whitelist either SN's IPs, or configure the REST message to use one of your MID servers and ask the owner of the repo that refuses connection to whitelist your IPs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
I have the same question as Blissy2. In my current headspace I would like to figure out if I can use Data Sources of type "REST (Integration Hub)", since this opens the door for Transform maps (and Robust Transformer). My current conclusion is: Yes I can, but with the limitation that Blissy2 is pointing out. If the endpoint only has a static resource path It's all good. But when you need a more dynamic type of resource path configuration, it seems the only way forward would be to create multiple Data Sources, each with their own "Request action".
I see that Custom (Load by script) is suggested as a solution, but I don't see how that can solve this challenge. And ultimately, would that be a better solution versus just building this out with normal Flow, Subflow, Action (with REST Step) in that case?
For some context (just playing around to learn): I am trying to see if I could/should build a Data Source with type REST (Integration Hub) to get the data I want from this API:
https://f1api.dev/docs/teams/year-teamId-drivers
This is to capture data about which drivers drove for which team, for a specific season. I'm able to get what I want with just normal REST Step in IH, but just exploring to see how else it could be done.
