Sort Results
This parameter allows you to specify the order in which objects of a particular type are retrieved.
/api/v4/
backend-deployment-id
/objects/
model
.json?sort[
field
]=
direction
GET
Replace
model
with the type of object that you wish to retrieve (as defined in your app's Data Model), for exampleperson
,job
orasset
.Replace
field
with the desired field name.Replace
direction
with a value defined below.
Parameters
Sort criteria are specified as a URL-encoded sort
hash. Valid keys for this hash are the names of the fields in that model. Sort directions can be expressed in JavaScript style: 1
or -1
- or human-readable: asc
, ASC
, desc
or DESC
Response
The response will contain a list of objects sorted by the specified field. The format of the objects is the same as for listing all objects (please refer to the Retrieve all Objects section).
Examples
BASE-URL
The below examples contain a BASE-URL
placeholder. Please refer to the HTTP Endpoints section to get the base URL relevant to your deployment.
Sort order - human readable:
Sort order - JavaScript style:
Last updated