Forum Discussion

ClevHR's avatar
ClevHR
Regular Visitor
6 years ago

Creating a loop for API call with __next property to get next set of records

Hi All,

Working with an API which has a limited response of 1000 records.

If there are more, a __next property will be given. Calling this link will provide the next 1000 records, etc.

Although there are some similiar requests on the community, i didnt managed to connect the dots yet.

 

My goal is to get the data from all _next property links and turn the response data into a table.

See below for further explanation.

 

Thanks!!

Bas

 

Example code:

let
    Source = Json.Document(Web.Contents("<LINK>?$format=json", [Headers=[Authorization="Basic <Auth.Code>"]])),
    d = Source[d]
in
    d