Task types description
This API allows you to get a list of task types, including their priorities, additional information, color coding, and account linkage.
How to get data
Request address
To get the data, use the address: https://tasks.<server_address>/backend/public/dictionary/tasks/types
Request method
GET
Request parameters
-
page — page number for selection (used for table visualization). Default: 1
-
start — offset for selection (used in SQL queries). Default: 0
-
limit — number of records per request. Default: 25
-
usr_id — user ID (can be taken from the object returned during authorization or initialization)
-
acc_id — account ID (also from authorization/initialization)
Example request
fetch("https://tasks.<server_address>/backend/public/dictionary/tasks/types?_dc=1597911482366&page=1&start=0&limit=100&sort=%5B%7B%22property%22%3A%22id%22%2C%22direction%22%3A
%22ASC%22%7D%2C%7B%22property%22%3A%22c_priority%22%2C%22direction%22%3A%22ASC%22%7D%5D", {
method: "GET",
headers: {
"accept": "*/*",
"accept-language": "uk-UA,uk;q=0.9,ru;q=0.8,en-US;q=0.7,en;q=0.6",
"x-csrf-token": "<your_csrf_token>"
},
credentials: "include"
})
|
Response
{
"page": 1,
"items": [
{
"id": 1,
"c_name": "Information",
"c_priority": 3,
"c_information": {"description": "This type of task is intended for setting up a job without the possibility of executing it. It is purely informational in nature."},
"c_account_id": 0,
"c_priority_name": "Not urgent",
"c_color": "event-severity-a0eac9",
"is_default": null
},
{
"id": 173,
"c_name": "Delivery",
"c_priority": 2,
"c_information": {"description": "Type designating the delivery of various goods"},
"c_account_id": 1107,
"c_priority_name": "Urgently",
"c_color": "event-severity-ffd6a2",
"is_default": true
}
],
"total": 7
}
|
In response to the API request, the following is returned:
-
id — task type ID
-
c_name — task type name
-
c_priority — task priority ID
-
c_information — additional information about the task type
-
c_account_id — account ID linked to this task type
-
c_priority_name — priority name
-
c_color — task type color
-
is_default — indicates if this is the default task type