Pagination

Vincent Trepanier -

Due to large data sets, paging is used for all index actions. The current page size is set to 100.

With every successful GET request, Fleet Manager Mobile API returns four response headers along with the result set.

Header Description
pagination-current-page The current page. Defaults to 1.
pagination-limit The per page limit. Currently set to 100 but subject to change at any time.
pagination-total-count The total number of records across all pages.
pagination-total-pages The total number of pages in the result set. Use this along with Pagination-Current-Page to determine if there are any remaining pages/records to be retrieved.

To retrieve data for a specific page, simply specify the page query parameter as in the example below. Pages start at 1. Any value less than 1 will trigger a "BadRequest" response while any value greater than Pagination-Total-Pages will simply return an empty result set.

# Get the fifth page of results for the vehicles index action.
/vehicles?page=5
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.