Implement pagination
Any list endpoint, with the exception of the /metrics
endpoints, should be paginated. Pagination should include a per_page amount with a default, but adjustable value (with a set maximum). The per_page
and page
values should be included as query parameters. When returning, the API should include some form of indication as to if there are more results to collect. Possibly a header with a total number of items/pages in the database, or even a simple boolean as to whether that is the last page.
Since the default pagination would be a breaking change, a new router should be created under /api/v3
. This router should start by copying over any routers that don't need adjustment, and declaring any new routers that do require adjustments. New CRUD methods are also likely required. These can be added to existing classes, most likely they can be put on base classes that get inherited. This ticket should likely be broken down into several smaller chunks as work is being done.