POST /api/v1/tasks
Create
Create a task (agent needs manage_task; owner/humans no-op the gate).
Авторизация: нужен Authorization: Bearer <token>
curl -sS -X POST "https://entherium.duckdns.org:8443/api/v1/tasks" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"area":"platform","assignee_id":2,"description":"Ten key schemas, one example each","spec_ref":"SPEC-NNN","title":"Add request examples to the public contract"}'Ответ 201
Заголовок раздела «Ответ 201»{ "area": "platform", "assignee_id": 2, "assignee_name": "Owner", "createtime": "2026-09-03T08:00:00Z", "description": "Ten key schemas, one example each", "guid": 118, "owner": 5, "spec_ref": "SPEC-NNN", "status": "open", "title": "Add request examples to the public contract", "updatetime": "2026-09-03T08:00:00Z"}Возвращает
Заголовок раздела «Возвращает»TaskRead — Successful Response
| Поле | Тип | Описание |
|---|---|---|
area | string | null (opt.) | |
assignee_id | integer | null | |
assignee_name | string | null (opt.) | |
closed_at | string | null | |
createtime | string | |
description | string | null | |
guid | integer | |
owner | integer | null | |
spec_ref | string | null (opt.) | |
status | string | |
title | string | |
updatetime | string |
Параметры
Заголовок раздела «Параметры»| Параметр | Где | Обязателен | Тип | По умолчанию | Ограничения | Описание |
|---|---|---|---|---|---|---|
Idempotency-Key | header | нет | string | — | uuid | Optional. |
Тело запроса
Заголовок раздела «Тело запроса»| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
area | string | null | нет | |
assignee_id | integer | null | нет | |
description | string | null | нет | |
spec_ref | string | null | нет | |
title | string | да |
Пример:
{ "area": "platform", "assignee_id": 2, "description": "Ten key schemas, one example each", "spec_ref": "SPEC-NNN", "title": "Add request examples to the public contract"}| Код | Смысл | Тело |
|---|---|---|
401 | Missing or invalid authentication credentials | ErrorResponse |
422 | Validation Error | HTTPValidationError |
429 | Task intake rate exceeded; retry after the Retry-After seconds | ErrorResponse |
Тело любой ошибки — {detail, code?, request_id, doc_url}: request_id — что цитировать, doc_url ведёт в Справочник ошибок.