Pagination

Some of our list endpoints are paginated, which means that you will need to make several requests to get all the data. This is useful when there is more data than what can be handled in a single request. The resources look approximately like this:

{
    "data": [],
    "continuationToken": "foo",
    "nextUrl": "/profiling/{resource}/{action}?foo=bar"
}

In order to consume these you need to keep requesting nextUrl until it is null, indicating there's no data left. In pseudocode:

data = []
response = request(endpointUrl)
while(response.nextUrl != null)
    response = request(response.nextUrl)
    data.add(response.data)

// data will now contain all the data

Note: Pagination URLs and continuation tokens expire after 24 hours.