Elide allows sorting of the primary collection being returned in the response via the sort query parameter.
The rough BNF syntax for the sort query parameter is:
<QUERY> ::= "sort" "=" <LIST_OF_SORT_SPECS> <LIST_OF_SORT_SPECS> = <SORT_SPEC> | <SORT_SPEC> "," <LIST_OF_SORT_SPECS> <SORT_SPEC> ::= "+|-"? <PATH_TO_ATTRIBUTE> <PATH_TO_ATTRIBUTE> ::= <RELATIONSHIP> <PATH_TO_ATTRIBUTE> | <ATTRIBUTE> <RELATIONSHIP> ::= <TERM> "." <ATTRIBUTE> ::= <TERM>
Sort books ascending by title:
Sort books descending by title:
Sort books ascending by their publisher’s name:
Sort books ascending by their publisher’s name and descending by their ID:
The keyword id can be used to sort by whatever field a given entity uses as its identifier.
Sorting across relationships performs an inner join between the primary collection type and its relationship type.
This may exclude results from the collection where a relationship is not present.