Skip to main content

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 methodRouteQuery parameter
PUT/sortid

Query parameters

The query parameter that is sent in the request line:

NameTypeDescription
idnumberRequired. 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:

NameTypeDescription
bystringRequired. The field by which to sort.
dirstringRequired. 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: