Pagination
All collection find
queries are paginated automatically. Responses are returned with top-level meta data related to pagination, and returned documents are nested within a docs
array.
Find
response properties:
Property | Description |
---|---|
| Array of documents in the collection |
| Total available documents within the collection |
| Limit query parameter - defaults to |
| Total pages available, based upon the |
| Current page number |
| |
| |
| |
| |
| |
Example response:
Pagination controls
All Payload APIs support the pagination controls below. With them, you can create paginated lists of documents within your application:
Control | Description |
---|---|
| Limits the number of documents returned |
| Get a specific page number |
Disabling pagination within Local API
For find
operations within the Local API, you can disable pagination to retrieve all documents from a collection by passing pagination: false
to the find
local operation.