Sorting

Complex fields, such as sub collections and nested json objects with child properties, are not sortable. See the descriptions of the cve, notification and patch endpoints to learn which fields are not sortable.

A simplistic sorting syntax is supported. Sort expressions should be presented in the following format:

{SortField:required} {direction|asc|desc:optional} delimited by a comma (,)

The supported sort directions are explicit and only asc and desc. Similar to filtering, sort field names are case insensitive. When a sort direction is left out, the field is assumed to be sorted in ascending order. By default, all fields are sortable and the query string parameter name is orderby.

Sort Expression Expected Output
?orderby=Field1 asc, Field2 desc The data resource will be initially sorted in asc order by Field1, then Field2 in desc order
?orderby=Field1, Field2 The data resource will default to first sorting by Field in asc order, then Field2 in asc order
?orderby=Field1, Field2, Field3 desc The data resource will be initially sorted in asc order by Field1, then Field2 in asc order and finally by Field3 is desc order