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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register 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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

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