Advanced Queries: Sorting
When querying REST resources, results can be sorted and ordered with the request parameters sort
and order
.
The sort
keyword is used to specify which attribute is considered for sorting the result.
Optionally the order
keyword can also be used to specify the result order. Available values are asc
for ascending and desc
for descending ordering. (the default order is asc
)
Example request:
$ curl -si -HX-User:admin -HX-Password:admin http://localhost:8082/structr/rest/files?sort=createdDate&order=desc