Forum Discussion
Collecting all pages from API paginated by cursor
Hello,
I'm strugling with collecting all data from API which is paginated by cursor. On every page I have 1000 records to collect. When I call my API for first page I got table which looks like that
In rows I have list of my data from page and below I have cursor which should I use for reaching next page. After searching many of topics I have created below M code
but when I run it Power BI create a list with data as expected, but every 1000 records are same from the first page. It looks like code is not replacing Options in my FnGetOnePage function with the new one. Can someone help me with this error?
1 Reply
- lbendlinSuper User
Looks like that cursor is Base64 encoded (MTAwMA== is 1000). Consult the API documentation on how they like to receive that cursor for retrieval of the next page.