Forum Discussion
Calling Paginated API with an "endCursor" variable that needs to be passed to subsequent calls
Hey there.
I'm looking for help for a bit of a complicated problem.
I have a connection to a REST API that returns a pagination variable to send on subsequent API requests to retrieve the next page.
I am trying to loop through the pages and get all the data into PBI desktop but am having trouble doing so with this endCursor variable.
Here's an example response for a call with an "endCursor"(the variable in question) and a "hasNextPage":
- Anonymous4 years ago
HI Anonymous,
Perhaps you can take a look at the 'GenerateByPage' helper function to create a custom function to iterator and expand records based on the page number:
Helper functions for M extensions for Power Query connectors - Power Query | Microsoft DocsRegards.
Moonlight
2 Replies
- AnonymousNot applicable
HI Anonymous,
Perhaps you can take a look at the 'GenerateByPage' helper function to create a custom function to iterator and expand records based on the page number:
Helper functions for M extensions for Power Query connectors - Power Query | Microsoft DocsRegards.
Moonlight
- AnonymousNot applicable
Hi Anonymous,
Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.
If these also don't help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng