Переименовать задачу
POST
/task/{task_id}/rename
const url = 'https://passports.dev.techcon-ml.ru/task/example/rename';const options = { method: 'POST', headers: { Authorization: 'Bearer <token>', 'Content-Type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams({name: 'example'})};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://passports.dev.techcon-ml.ru/task/example/rename \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data name=exampleПринимает application/x-www-form-urlencoded с полем name. Максимум 255 символов. Всегда возвращает редирект 303 на главную страницу (нет JSON-режима, в отличие от /upload и /task/{id}/update).
Authorizations
Заголовок раздела «Authorizations»Parameters
Заголовок раздела «Parameters»Path Parameters
Заголовок раздела «Path Parameters»task_id
required
Task Id
string
UUID задачи
Request Bodyrequired
Заголовок раздела «Request Bodyrequired»Responses
Заголовок раздела «Responses»Successful Response
Media typeapplication/json
Examplegenerated
exampleРедирект на / после успешного переименования
Пустое имя или длиннее 255 символов
Media typeapplication/json
ApiErrorResponse
object
ok
Ok
boolean
error
required
ApiErrorDetail
object
code
required
Code
Машиночитаемый код ошибки (UPPER_SNAKE_CASE)
string
message
required
Message
Человекочитаемое описание ошибки
string
Example
{ "ok": false}Не авторизован или токен истёк
Media typeapplication/json
ApiErrorResponse
object
ok
Ok
boolean
error
required
ApiErrorDetail
object
code
required
Code
Машиночитаемый код ошибки (UPPER_SNAKE_CASE)
string
message
required
Message
Человекочитаемое описание ошибки
string
Example
{ "ok": false}Задача не найдена
Media typeapplication/json
ApiErrorResponse
object
ok
Ok
boolean
error
required
ApiErrorDetail
object
code
required
Code
Машиночитаемый код ошибки (UPPER_SNAKE_CASE)
string
message
required
Message
Человекочитаемое описание ошибки
string
Example
{ "ok": false}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}