HTTP for API Transport
Resources and URI Structure
Hypermedia Application Language (HAL)
Representation Profiles and Schemas
Optimistic Locking and Concurrency
Error Responses and Error Representation
Sorting on collections can be performed by adding a
?sortBy=sort-criteria query parameter to the
GET operation on the collection:
GET https://api.thirdpartybank.com/transactions/scheduledTransactions?sortBy=createdAt GET https://api.thirdpartybank.com/transactions/scheduledTransactions?sortBy=-postedAt,title
sort-criteria are a list of sort keys, expressed as a comma-separated list of properties that exist in the collection’s item schema.
The order of properties determin sort priority: with
?sortBy=-postedAt,title, the collection is sorted
postedAt (in descending order), then by the secondary sort key, `title’.
The default is ascending order.
- prefix on a sort key denotes descending order.
Not all properties are allowed in sort criteria; properties which have object or array types are not sortable.
sortBy property us preverved in the
_links embedded in the collection response body.