Sorting
Last updated
Last updated
Apply sorting for list endpoints like All Documents and Document Collections. Each sorting parameter refers to one field. It is possible to provide a single or multiple sorting parameters.
Possible values for the sorting parameter are:
Lists are ordered descending by default.
GET
https://api.cmft.io/v1/<repoName>/<endpoint>?sorting[<fields|meta>.<fieldName>]=<direction>
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Sorting can be applied for the following field types:
Text
Richtext
Number
Date & Time
Boolean
Location
Select
Color
Find some examples on the query examples page:
Value
Function
ASC
or 1
Returns the list ordered ascending
DESC
or -1
Returns the list ordered descending
repoName
string
The API identifier of the repository
endpoint
string
The endpoint you'd like to request
sorting
string
Provide the order direction ASC
or DESC
Authorization
string
Provide an API Key