Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
spook2020202
Contributor III
Contributor III

Getting data from a REST endpoint using a loop

Hi,

I'm having trouble getting data from a rest endpoints using a loop.
What I'm doing is calling an endpoint which returns a list of football leagues:
image.png

Once it has this data, what im trying to do is loop through each item in the list, and for each one, query a different endpoint using the league_id. So using the table above, i would expect it to call the endpoints 20 times which would get all of the matches for each of the leagues.
The endpoints has some headers that need to be added to the call but the only "dynamic" part of the request is a query param. eg:

https://api-football-v1.p.rapidapi.com/v2/fixtures/league/<league_id_from_table>

EG:
https://api-football-v1.p.rapidapi.com/v2/fixtures/league/5

Is anyone able to assist or provide an example of looping through a table and making a rest call with headers?

Thanks 

Labels (2)
1 Solution
3 Replies
spook2020202
Contributor III
Contributor III
Author

Exactly what i needed. Thanks.
marksouzacosta

As an addition to this topic, I'm excited to share my latest tutorial on integrating Asana with Qlik Cloud using REST APIs!

In this step-by-step guide, you'll learn:
- How to use Asana REST APIs with Postman
- Creating REST Data Connections in Qlik Cloud
- Extracting data from Asana and saving as Parquet files
- Enhancing connections with custom parameters and pagination

Check out the full video on YouTube:
Integrate Asana with Qlik Cloud Using REST APIs: A Step-by-Step Guide
https://youtu.be/lFwar30BNkQ?si=UZoM_x9L5amdJSnf

Regards,

Mark Costa

Read more at Data Voyagers - datavoyagers.net