So i have a URL, lets call it /linky. This only allows me to pull 100 results at a time. The URL allows both/either
Cursor-based Pagination
/linky?event-num-after=199
Offset-based Pagination
Example of retrieving item records 90 to 100 /linky?offset=90&limit=10
What’s the best way to get this to run in a loop, when the initial URL gives no idea, how many results there will be, and dump into one long list?
I think offset might be best for me, but need to make some form of counter for the loop and the first URL need to be plain, without any pagination etc it doesn’t work otherwise
will have a look, might have some follow up questions like if your initial page results doesn’t have anything to say there are more results, you just know that there are.
i have many API that give no indication of more data, but there actually is there. Whats your best recommendation for iteration in this situation, one HTTP node for original request, and then a second one to set offset, and make some sort of looop, but need a counter and a way to stop it when no result come back
It would be like @RicardoE105 mentioned, Keep making a call and looping until you get no data, Without having an API to play with that does that it is hard to put a proper example together but the one below would increase a limit and offset counter on each loop. The If node would need to have a condition in it based on the API response to know if there is no data so maybe if the body is empty or doesn’t contain a value then on the false it will merge all the data for you so you can work like normal from there.
Hey Jon, I am dealing with a similar problem and trying to understand how your workflow works. I can’t understand how the offset value in the “Set” node changes, because the HTTP node takes this value and not the “Increase offset” value after each iteration.