Available Operators
+: descending-: ascending
Examples
sort=-createdAt: Sort in descending order of created at.sort=+updatedAt: Sort in ascending order of updated at.sort=-createdAt&sort=+updatedAt: You can use sort in multiple fields.
Paging
At the end of GET all responses there is the paging guide showing counts and total pages. Paging can be done on any GET all response where the response exceeds 250 objects. By default, all responses are page 1.
Example query format: page=2
Example end of response:
...
"first_page_url": "http://127.0.0.1/api/endpoint?page=1",
"from": 1,
"last_page": 5,
"last_page_url": "http://127.0.0.1/api/endpoint?page=5",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://127.0.0.1/api/endpoint?page=1",
"label": "1",
"active": true
},
{
"url": "http://127.0.0.1/api/endpoint?page=2",
"label": "2",
"active": false
},
{
"url": "http://127.0.0.1/api/endpoint?page=3",
"label": "3",
"active": false
},
{
"url": "http://127.0.0.1/api/endpoint?page=4",
"label": "4",
"active": false
},
{
"url": "http://127.0.0.1/api/endpoint?page=5",
"label": "5",
"active": false
},
{
"url": "http://127.0.0.1/api/endpoint?page=2",
"label": "Next »",
"active": false
}
],
"next_page_url": "http://127.0.0.1/api/endpoint?page=2",
"path": "http://127.0.0.1/api/endpoint",
"per_page": 250,
"prev_page_url": null,
"to": 250,
"total": 1186
}