Skip to main content
Version: Early Access

sort

Any attribute definition can be used to sort the results of a query. Tokens can be preceded by + or - to indicate ascending or descending sort respectively.

rest-1 URL Syntax

In rest-1.v1/Data and rest-1.oauth.v1/Data, the sort parameter is a URL query parameter with a list of attribute definitions and sort prefixes: sort=[-]<attribute definition>[,[-]<attribute definition>]*. The following shows how sort is expressed in a query.

            <Server Base URI>/rest-1.v1/Data/Story?sel=Name,Estimate&sort=Estimate

query.v1 Syntax

In query.v1 and query.legacy.v1, the sort parameter is expressed as an array. Include a sort key with a value that is a list of attribute definitions to sort by.

YAML

            from: Story
sort:
- -Estimate
- +Name

JSON

            {
"from": "Story",
"sort":
[
"-Estimate",
"+Name"
]
}