To sort the documents (or files) embedded in a collection (or bucket) representation, use the sort_by query parameter.
Default sorting is by _id descending. If _id are ObjectId, this makes sure that last created document or file is the first returned.
sort by the property date ascending
sort by the property date descending
sort by the property date descending and title ascending
note that you specify multiple sort options using multiple sort_by query parameters
- Collection Resource
- Document Resource
- Bucket Resource
- File Resource
- Representation Format
- Reference Sheet
- Query Documents
How to use the examples
The examples make use of the brilliant httpie CLI HTTP client and are ment to be used with RESTHeart stareted on the localhost without the authentication enabled.
Eventually pass username and password with the
-a username:password option.