Удалить загруженное изображение из сессии
DELETE
/api/v1/image/{image_id}
const url = 'https://passports.dev.techcon-ml.ru/api/v1/image/example';const options = {method: 'DELETE'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://passports.dev.techcon-ml.ru/api/v1/image/exampleУдаляет временно хранящееся изображение из сессии. Требует тот же bti_session_id cookie. После cleanup_session (вызывается автоматически в create-pdf) возвращает 404.
Parameters
Заголовок раздела «Parameters»Path Parameters
Заголовок раздела «Path Parameters»image_id
required
Image Id
string
Responses
Заголовок раздела «Responses»Изображение удалено
Нет активной сессии
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": {} } ]}