Forum Discussion
Asalk
4 years agoFrequent Visitor
How do I convert dynamic source with paginated REST API that uses offset to a static source?
I found an article that helped me paginate the REST API, however i'm not sure how to use Web.Content() to make the source static while using offset. This is the code i'm using : let
...
amitchandak
4 years agoSuper User
Asalk , Have you already checked these
https://medium.com/@marktiedemann/how-to-do-pagination-in-power-query-430460c17c78
Asalk
4 years agoFrequent Visitor
Hey amitchandak ,
I checked the two articles you mentioned, unfortunately I have already checked these before. My main problem is with offset
GetPage = (Index) =>
let
offset = "&offset=" & Text.From(Index * EntitiesPerPage),
Url = Web.Contents(Url,[RelativePath="/resources/11.13.18.05/workers",Query =[limit="500",totalResults="true",offset=Number.From(Index * EntitiesPerPage)]]),
Json = GetJson(Url),
Value = Json[#"items"]
in
Value,
i'm trying to wrap my head around it. this is my first time using REST API as we just have moved to Oracle Cloud, and it seems this is the only way to connect Power BI to SaaS.
Thanks.