apaleo / announcements

Subscribe to this repo to be notified about changes in the apaleo API
15 stars 1 forks source link

Pagination limits [May 22nd, 2021] #77

Open dario-hd opened 3 years ago

dario-hd commented 3 years ago

Let's say you are asking for all the reservations in your account. That could result in a huge amount of data.

At the moment, if you don't specify the pageSize parameter, you get all the data. We are changing this behavior limiting the result to 5000 items if don't specify a pageSize parameter or if you specify a pageSize larger than 5000.

We recommend you always specify the pageSize so that you know how many items to expect.

You should be prepared to get limited results from requests that are paginated. For the transition, you could compare the count with the count of the returned items. In case they differ, you should continue calling the same endpoint for the next pages until you receive a 204 status code.

In addition to the changes described above, we are introducing the pagination parameters for the following endpoints:

If you are using any of the endpoints above, be sure that you are prepared to receive limited data and you should continue calling the endpoint.

UPDATE:

The page size limit is going to be 5000 for all the endpoints. With the following exceptions which will have no limits for the moment:

moseratgit commented 3 years ago

is this already in place for /rateplan/v1/rate-plans/{id}/rates? Meaning no pager given results in 100 rates maximum?