PATCH /api/v1/tickets/{guid}
Transition Ticket
Resolve / dismiss / promote a ticket, state-machine-guarded.
Owner-only. An illegal transition (e.g. closing an already-closed ticket) → 409.
Авторизация: нужен Authorization: Bearer <token>
curl -sS -X PATCH "https://entherium.duckdns.org:8443/api/v1/tickets/<guid>" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"action":"resolve","resolution":"fixed in build 0.3.1; verified on the live URL"}'Ответ 200
Заголовок раздела «Ответ 200»В контракте нет примера для этого ответа; схема: TicketRead. Поля — в интерактивном обозревателе.
Возвращает
Заголовок раздела «Возвращает»TicketRead — Successful Response
| Поле | Тип | Описание |
|---|---|---|
area | string | null (opt.) | |
closed_at | string | null (opt.) | |
component | string | null (opt.) | |
contract_guid | integer | null (opt.) | |
createtime | string | |
description | string | null (opt.) | |
duplicate_of | integer | null (opt.) | |
evidence | object (opt.) | |
fingerprint | string | |
first_seen | string | null (opt.) | |
guid | integer | |
kind | string | |
last_seen | string | null (opt.) | |
occurrence_count | integer | |
promoted_to | string | null (opt.) | |
reporter | string | null (opt.) | |
repro | object (opt.) | |
resolution | string | null (opt.) | |
severity | string | null (opt.) | |
spec_ref | string | null (opt.) | |
status | string | |
title | string | |
vote_count | integer |
Параметры
Заголовок раздела «Параметры»| Параметр | Где | Обязателен | Тип | По умолчанию | Ограничения | Описание |
|---|---|---|---|---|---|---|
guid | path | да | integer | — | — | |
Idempotency-Key | header | нет | string | — | uuid | Optional. |
Тело запроса
Заголовок раздела «Тело запроса»| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
action | "resolve" | "dismiss" | "promote" | "target" | "reopen" | "edit" | да | |
description | string | null | нет | |
promoted_to | string | null | нет | |
resolution | string | null | нет | |
severity | "sev1" | "sev2" | "sev3" | "sev4" | null | нет | |
spec_ref | string | null | нет | |
title | string | null | нет |
Пример:
{ "action": "resolve", "resolution": "fixed in build 0.3.1; verified on the live URL"}| Код | Смысл | Тело |
|---|---|---|
401 | Missing or invalid authentication credentials | ErrorResponse |
422 | Validation Error | HTTPValidationError |
Тело любой ошибки — {detail, code?, request_id, doc_url}: request_id — что цитировать, doc_url ведёт в Справочник ошибок.