Document Service API: Sorting and paginating results
Page summary:Use the Document Service API's
sortand pagination parameters to order query results by single or multiple fields and control result limits withlimitandstart.
The Document Service API offers the ability to sort and paginate query results.
Sort
To sort results returned by the Document Service API, include the sort parameter with queries.
Sort on a single field
strapi.documents().findMany()Sort on a single field
Sort results based on a single field using a string value.
Sort on multiple fields
strapi.documents().findMany()Sort on multiple fields
Sort results on multiple fields by passing an array of sort objects.
Pagination
strapi.documents().findMany()Pagination
Paginate results using the limit and start parameters.
Was this page helpful?