Pagination without page indication in response

I’m contacting a REST API which enforces pagination, however doesn’t provide any metadata such as page number, total number of elements, total number of pages, etc. in it’s response.

In that case, do you have a suggestion on how i could increment the page number in the ‘next URL’ each time? Right now I’m using ‘startAt’ which i define as 1 in a mapper previous to the the REST GET, but of course incrementing it will only work once, since i don’t actually modify the original document, so i’d effectively put the pipeline in a loop if i check for the entity length being > 0.

Is there possibly some pipeline expression that i could use, e.g. the number of documents currently in the context?

Best regards
Thomas