I’m putting together a helper function that gets all content items for my models. It’s basically a wrapper around builder.getAll that handles pagination since the content API is limited to max 100 items per response.
The naive approach would be to fetch all my content items sequentially, checking the number of items returned and incrementing offset each time.
However, I’d like to take a more sophisticated approach where I do all my requests in parallel. To do that, I need to know how many content items there are beforehand so that I know how many requests I need to make.
Is this possible? I checked the admin API and didn’t see anything, and I don’t see anything in the content API that would allow me to do this.
Hey @ersin currently there is no metadata on the model that would say how many elements exist for that model, but we have heard that feedback before. Currently, the best process is to set a limit of 100 and then check if you get 100 results then make the call for the next 100 and so on, something like this: