Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Call API in loop

I have one API which give a paginated response as 

{

value: [object]

nextapi: api

}

Now for example if the total number of records are 100. Then in first run it will return 10 records and api to get the next 10 records will be in the nextapi variable. So, I need to call it in loop and till there is nextapi available in response loop should continue and append the data. Below is my code,

sourajs_0-1625142100241.png

But I am getting below error when fired the function

sourajs_1-1625142117541.png

 

1 REPLY 1
mahoneypat
Microsoft Employee
Microsoft Employee

If your API has skiptoken or offset capability, you could consider this alternate approach.

Power BI - Tales From The Front - REST APIs - YouTube

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors