Forum Discussion
Scheduling dynamic anonymous API Refresh in Power BI service
Hi jpt1228 ,
Try this:
pageRange = {0..Number.RoundUp(totalItems / 250)-1}
pages = List.Transform(pageRange, each ufnCallAPI(_*250+1)),
You can take a look at the following document about the help functions about processing pagination api if it meet your requirement:
Helper functions for M extensions for Power Query connectors | Microsoft Docs
Solved: Power Query M function in Paginate API - Microsoft Power BI Community
Solved: Paginate Rest API via Offset and Limit method - Microsoft Power BI Community
Revisiting Dynamic Web.Contents()
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- jpt12285 years agoResponsive Resident
Hello Anonymous Thanks for your reply. If I put all this together in one query is this the correct query string?
(Page as text) =>
let
Source = Json.Document(Web.Contents("https://harvest.greenhouse.io/v1/jobs?", [Headers=[AUTHORIZATION="Basic xxxxxxxxxxxxxxxxxxxxxx="]])),pageRange = {0..Number.RoundUp(totalItems / 250)-1}
pages = List.Transform(pageRange, each Page(_*250+1)),- jpt12285 years agoResponsive Resident
Hello Anonymous I wanted to follow up on your response. Where do I put your suggested modifications? Does it replace the "Query="? If you could help with the complete API call it would be much appreciated.
Thanks