Chat

Открыть сессию загрузки вложения чата

Проверяет право прикреплять файл и квоту кабинета до выдачи адреса. Байты идут напрямую в хранилище: post — один multipart POST, parts — PUT частей, api — запасной авторизованный путь только для клиента. После отправки байтов вызовите finish. Порог 100 MiB снят. Файлы свыше 500 MiB получают статус skipped и открываются ссылкой с явной пометкой «не проверен антивирусом»; заражённый файл и сбой сканера этим не обходятся.

post/api/v1/chat/conversations/{id}/upload-sessions

Request

  • Base URL: https://erp.akeda.ru
  • URL: https://erp.akeda.ru/api/v1/chat/conversations/{id}/upload-sessions
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://erp.akeda.ru/oauth2/authorize, token URL https://erp.akeda.ru/oauth2/token, scopes: akeda:delegate)

Request body

namestring required
mime_typestring
size_bytesinteger required
sha256string

Необязательная lowercase SHA-256 сумма файла.

Response

Сессия и инструкции загрузки

idstring uuid required
owner_type'conversation' required
owner_idstring uuid
namestring required
mime_typestring required
size_bytesinteger required
sha256string
status'pending' | 'processing' | 'attached' | 'failed' | 'expired' required
failurestring
failure_detailstring
scan_status'clean' | 'infected' | 'skipped'
scan_verdictstring
published_refstring uuid
expires_atstring date-time required
created_atstring date-time required
completed_atstring date-time

Changes

No recorded changes to this operation across all 1 revision of this API.