Power BI: Power Query API Pagination with Cursor

Job ID: 35366622

Budget: $30 – $250 USD

I have a url with the structure:
https://baseurl&pagination=1

When you enter the url in the Web connector in Power Query you will get the result in the attachement:

The url will give us the 1000 first records and the cursor for the next page. I need to loop through all the pages to get all the records. I guess we need to use the function List.Generate somehow. So the next page will then be:

https://baseurl&pagination=2&cursor=”CursorForNextPage”

“CursorForNextPage” is the value for meta.next_cursor which you see in the attachment. We need to loop through until “meta.next_cursor” is null/blank
Related categories: Power BI Microsoft PowerBI