Dimension Service API  2.0.0
api index

SearchSort Object

since: 0.32
Specifies how to sort the matching results.

Fields

field
0.32required
string
The field to sort by. Valid values include name and labels. When other values are entered, it is assumed that the value is the name of an attribute.
order
0.32required
string
The sort order. Valid values are only asc or desc for ascending order and descending order respectively.
type
0.32required
string
The attribute type. Valid values include base64, decimal, percent, integer, and text.

This value is used together with the field type when sorting based on an attribute instead of a name or label.

locale
0.32required
string
The labels locale to sort by. This value is used when the field value is labels.

Related API Objects

Example - Sort by the name field in ascending order

{
  "field": "name",
  "order": "asc"
}

Example - Sort by the name field in descending order

{
  "field": "name",
  "order": "desc"
}

Example - Sort by the labels field in ascending order and locale 'en-US'

{
  "field": "labels",
  "order": "asc",
  "locale": "en-US"
}

Example - Sort by the labels field in descending order and locale 'en-US'

{
  "field": "labels",
  "order": "desc",
  "locale": "en-US"
}

Example - Sort by the 'FOUNDER' attribute of type 'text' in ascending order

{
  "field": "FOUNDER",
  "order": "asc",
  "type": "text"
}

Example - Sort by the 'FOUNDER' attribute of type 'text' in descending order

{
  "field": "FOUNDER",
  "order": "desc",
  "type": "text"
}

Example - Sort by the 'DATETIME' attribute of type 'datetime' in ascending order

{
  "field": "DATETIME",
  "order": "asc",
  "type": "datetime"
}

Example - Sort by the 'DATETIME' attribute of type 'datetime' in descending order

{
  "field": "DATETIME",
  "order": "desc",
  "type": "datetime"
}