Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
spook2020202
New 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 (3)
1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Getting data from a REST endpoint using a loop

2 Replies
MVP & Luminary
MVP & Luminary

Re: Getting data from a REST endpoint using a loop

spook2020202
New Contributor III

Re: Getting data from a REST endpoint using a loop

Exactly what i needed. Thanks.