Forum Discussion

KjoniX2's avatar
KjoniX2
New Member
2 years ago

Rest API pagination

I try to retrieve records from a Rest API in PowerBI, but struggle to get all pages. 

 

The API supports parameters &count and &from, and naked api calls gives this what seen in screenshot.

Default count is 1000, and and max count is 100 000. Yes, for this example I am below 100 000 and will get all records with ?count = 100000, but I have tables that contains more than 100 000 records.

 

How can I utilize fullResultSize, from and count to achive all records? 

 

1 Reply

  • in your example you would fetch the first 1000 rows, then note the fullResultSize, and create a list {1000,2000,3000,4000,5000,6000,7000}. Then you would run seven more API calls, each with the "From" set acordingly.  Lastly you would combine all the results of the eight API calls.