Forum Discussion
Paginate through API call in M
- 4 years ago
Please see this video for a good way to do this.
Power BI - Tales From The Front - REST APIs - YouTube
Pat
mahoneypat I may have spoken too quickly here... I got the API to return results, but including that $top=50 parameter in the call just meant I get the top 50 results over and over again. The call now looks like this:
https://endpointURL?$filter=Type eq 'Base' &Date='2021-09-26'&$top=50&limit=50&offset=" &[Column1]But, if I remove the $top=50, then the API returns a 500 error (even with the limit & offset functions included).
Thoughts on what I might be doing wrong? (If I get a 500 error in my browser or Postman, I can get a log ID response that our development team can use internally to track a more precise error message. Is there any way to retrieve a response ID from within Power BI when it throws a 500 error?)
Figured it out. User error; needed to switch limit / offset to top / skip.
Thanks again! Cheers!