OrderExpressions

OrderExpressions order resource collections according to one or more criteria.

order=[-]<OrderProperty>[,OrderProperties]

Order

The order for each OrderProperty will be ascending unless it is prefixed with a minus (U+002D HYPHEN-MINUS, “-“), in which case it will be descending.

Examples

Operator Description Example
  ascending order order=createdAt
- descending order order=-createdAt
, multiple order properties order=-createdAt,name

OrderProperties

OrderProperties are properties used to order resource collection results. For example, given the /folders resource below, the available OrderProperties are id, createdAt, ownerId, and name.

{
  "folders": [
    {
      "id": 0,
      "createdAt": "string",
      "ownerId": "string",
      "name": "string"
    }
  ],
  "pageData": { ... }
}

OrderExpressions containing one or more unknown OrderProperties result in a 400 Bad Request.