Loop/Repeat until Array is empty

I have an API which paginates the results. The Problem is that I don’t get any information how many pages there are so that I have to make x Requests until the array I get in the response is empty.

Is there any way to build this in make? I came to the conclusion no but maybe I am missing something.

It is doable using the repeater in a not very elegant way:

Repeater → GET variable “array” → GET request -|filter: array is not empty|-> set variable “array”: merge (array (from get variable);array (GET request) → array aggregator

The issue is that you need to have a static limit on your repeater and that you will use operations for “nothing”. For example if you set you top limit at 20 and get 3 pages worth of results you will use 17x 2 operations.

If the creation of your own app is an option, you could use the pagination option in your module:


Pagination makes my world go round :slight_smile:

1 Like