PUT /sort
Description
Sorts all tasks of an active project by the specified parameters and returns an empty json object
The route handles the PUT request made to the /sort/{id}
path.
HTTP method | Route | Query parameter |
---|---|---|
PUT | /sort | id |
Query parameters
The query parameter that is sent in the request line:
Name | Type | Description |
---|---|---|
id | number | Required. The ID of the active project for which tasks will be sorted. |
Payload
The server expects to receive a json object with the next properties:
Name | Type | Description |
---|---|---|
by | string | Required. The field by which to sort. |
dir | string | Required. The direction of sorting: "asc" or "desc". |
Example:
{
"by": "due_date",
"dir": "asc",
}
Response
In case of the success status, an empty json object is returned. The HTTP status code shows whether the request succeeds (response.status == 200) or fails (response.status == 500).
Related articles: