Sorting search results
You can sort search results by specifying a sort query parameter and a corresponding sort value (ASC or DESC case sensitive) on a collection resource URL. The example cURL call returns all someCollection resources ordered by the following:
-
The
someCollectionresourcecreatedAtdate sorted ascending (case insensitive). -
The
someCollectionresource label sorted descending (case insensitive).
Sorting search results in someCollection resources:
RequestResponse
curl -X GET '<baseURL>/v2/someCollection?sort=createdAt::ASC|label::DESC'