-
Notifications
You must be signed in to change notification settings - Fork 1
Basic Paginated Response & Request
VeguiDev edited this page Sep 16, 2022
·
2 revisions
Index:
Headers of paginated response.
x-page-count: Number of available pages.
x-page-index: Index of response page.
x-page-size: Size of the list in response body.
It is the request to an endpoint that returns a paginated list.
page (optional): It is the index of the page. Default:1
sort (optional): Sort the response according to a field.
object
fields (optional): List that contains the parameters that will be in the objects of the list.
size (optional): Size of the list returned.
Example requesting resources (/api/v2/resources).
{
"size": 10,
"page": 1,
"fields": ["id","title", "description", "downloads"],
"sort": {
"must": "most",
"field": "downloads"
}
}