Task types
Tasks · 3 операції
GET
List task types
/api/task-typeTask types with their subtypes. Use the ids when creating or filtering tasks.
list_task_types
Параметри запиту · 2
nameдовжина макс. 100isArchivalOmitted: active only; true: archived only; all: everything (becomes undefined, no filter).за замовчуванням falseВідповідь · 200
application/json
statusCodeприклад 200message—data4 поля
total—totalPages—currentPage—taskTypes10 полів
taskTypeId—name—icon—color—instruction—isDefault—order—isArchival—updatedAtформат YYYY-MM-DDTHH:mm:sscreatedAtформат YYYY-MM-DDTHH:mm:sscurl "https://your-school.rist.pro/api/task-type" \
-H "Authorization: Bearer $RIST_API_KEY"const response = await fetch("https://your-school.rist.pro/api/task-type", {
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
},
});
const { data } = await response.json();import os
import requests
response = requests.get(
"https://your-school.rist.pro/api/task-type",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
)
response.raise_for_status()
data = response.json()["data"]Приклад відповіді · 200
{
"statusCode": 200,
"message": "Operation completed successfully",
"data": {
"total": 0,
"totalPages": 0,
"currentPage": 0,
"taskTypes": [
{
"taskTypeId": 1,
"name": "string",
"icon": "string",
"color": "string",
"instruction": "string",
"isDefault": false,
"order": 0,
"isArchival": false,
"updatedAt": "2026-11-09T14:30:00",
"createdAt": "2026-11-09T14:30:00"
}
]
}
}POST
Create task type
/api/task-typeAdd a task type (name, icon key as in lesson types, optional #RRGGBB color and an instruction shown on its tasks). isDefault makes it the type of new tasks instead of the current default.
create_task_type
Тіло запиту
application/json · object
nameдовжина 1–100iconKey from the icon catalog shared with lesson types.довжина макс. 50colorAny #RRGGBB color, not a palette name.довжина 7–7instructionHint for the manager, shown on the card of a task of this type.довжина макс. 2000isDefaultType given to a new task; switched in a transaction so there is always exactly one.Відповідь · 201
application/json
statusCodeприклад 201message—data10 полів
taskTypeId—name—icon—color—instruction—isDefault—order—isArchival—updatedAtформат YYYY-MM-DDTHH:mm:sscreatedAtформат YYYY-MM-DDTHH:mm:sscurl -X POST "https://your-school.rist.pro/api/task-type" \
-H "Authorization: Bearer $RIST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"icon": "string",
"color": "string",
"instruction": "string",
"isDefault": false
}'const response = await fetch("https://your-school.rist.pro/api/task-type", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "string",
"icon": "string",
"color": "string",
"instruction": "string",
"isDefault": false
}),
});
const { data } = await response.json();import os
import requests
response = requests.post(
"https://your-school.rist.pro/api/task-type",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
json={
"name": "string",
"icon": "string",
"color": "string",
"instruction": "string",
"isDefault": False
},
)
response.raise_for_status()
data = response.json()["data"]Приклад відповіді · 201
{
"statusCode": 201,
"message": "Operation completed successfully",
"data": {
"taskTypeId": 1,
"name": "string",
"icon": "string",
"color": "string",
"instruction": "string",
"isDefault": false,
"order": 0,
"isArchival": false,
"updatedAt": "2026-11-09T14:30:00",
"createdAt": "2026-11-09T14:30:00"
}
}PUT
Update task type
/api/task-type/{id}Change a task type; name and icon are always required.
update_task_type
Параметри шляху · 1
id—Тіло запиту
application/json · object
nameдовжина 1–100iconKey from the icon catalog shared with lesson types.довжина макс. 50colorAny #RRGGBB color, not a palette name.довжина 7–7instructionHint for the manager, shown on the card of a task of this type.довжина макс. 2000isDefaultType given to a new task; switched in a transaction so there is always exactly one.Відповідь · 200
application/json
statusCodeприклад 200message—data10 полів
taskTypeId—name—icon—color—instruction—isDefault—order—isArchival—updatedAtформат YYYY-MM-DDTHH:mm:sscreatedAtформат YYYY-MM-DDTHH:mm:sscurl -X PUT "https://your-school.rist.pro/api/task-type/1" \
-H "Authorization: Bearer $RIST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"icon": "string",
"color": "string",
"instruction": "string",
"isDefault": false
}'const response = await fetch("https://your-school.rist.pro/api/task-type/1", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "string",
"icon": "string",
"color": "string",
"instruction": "string",
"isDefault": false
}),
});
const { data } = await response.json();import os
import requests
response = requests.put(
"https://your-school.rist.pro/api/task-type/1",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
json={
"name": "string",
"icon": "string",
"color": "string",
"instruction": "string",
"isDefault": False
},
)
response.raise_for_status()
data = response.json()["data"]Приклад відповіді · 200
{
"statusCode": 200,
"message": "Operation completed successfully",
"data": {
"taskTypeId": 1,
"name": "string",
"icon": "string",
"color": "string",
"instruction": "string",
"isDefault": false,
"order": 0,
"isArchival": false,
"updatedAt": "2026-11-09T14:30:00",
"createdAt": "2026-11-09T14:30:00"
}
}