External API per call limit

Hello Wapplers,

I have an external API endpoint which limits 10 input data values per call.
In my database I have 25 entries which I would like to be as a data input for external API calls.
Question is: what would be best approach in “Wappler way” to go trough all 25 database entries and set repeated API call with 10 input per call (it will be first 10 entries, another 10, and rest 5 entries)?

Thank for the help in advance.

So I came up with this solution:

  1. Database query to get all entries in database (query_all)
  2. Creating repeat with Expression: (query_all.count() / 10).round() - with this step will get needed amount of repeats
  3. Repeat step will be Database Paged Query with parameters: Offset: $number * 10 - 10 - $number is a current repeat step (first will be 1) Limit: 10

Not sure if this best solution but it does what’s need to be done.