Specifies how to sort the matching results.
Fields
field
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
string
|
The sort order. Valid values are only asc or desc for ascending order
and descending order respectively.
|
type
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
string
|
The labels locale to sort by. This value is used when the field value is labels.
|
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"
}