Pagination & Sorting
Use sorting and pagination if your response is valid JSON.
Pagination
Sorting
Exmaples
Last updated
Use sorting and pagination if your response is valid JSON.
Last updated
// ?page=1&limit=2&sortByDesc=id
{
"errors": null,
"responseData": [
{
"id": "10",
"email": "[email protected]",
"createdAt": "1472971147",
"content": "sometext"
},
{
"id": "9",
"email": "[email protected]",
"createdAt": "527244709",
"content": "sometext"
}
]
}
// ?page=2&limit=2&sortByDesc=id
{
"errors": null,
"responseData": [
{
"id": "8",
"email": "[email protected]",
"createdAt": "1275109461",
"content": "somecontent"
},
{
"id": "7",
"email": "[email protected]",
"createdAt": "931692331",
"content": "somecontent"
}
]
}
// ?page=1&limit=2&sortByAsc=id
{
"errors": null,
"responseData": [
{
"id": "1",
"email": "[email protected]",
"createdAt": "822285684",
"content": "somecontent"
},
{
"id": "2",
"email": "[email protected]",
"createdAt": "683679219",
"content": "somecontent"
}
]
}
// ?page=2&limit=2&sortByAsc=id
{
"errors": null,
"responseData": [
{
"id": "3",
"email": "[email protected]",
"createdAt": "1379197938",
"content": "somecontent"
},
{
"id": "4",
"email": "[email protected]",
"createdAt": "630925663",
"content": "somecontent"
}
]
}