Forum Discussion
Pagination with Rest API query and JSON file
- Anonymous7 years ago
I was able to solve my problem generating the offset with the List.Numbers function instead of a specified list.
OffsetValue = List.Numbers(0,100000,1000), this give me a list from 0 to one hundred thousand in increments of 1000 which works perfectly.
I used the following as a basis for similar to what you are looking
https://medium.com/@marktiedemann/how-to-do-pagination-in-power-query-430460c17c78
Basically, you need to be able to know the total # of records, # of records returned per page, then based on that figure out how many iterations to call the api
The rest api I used would rerturn the total # of records that were in the entity I was querying, and since I could set the page size, I calculated the # of iterations it would take to pull in all of the records
Hope the above referenced link helps, and it did for me
Good luck