Chat

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

Changed on

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

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

Request

  • Base URL
    https://erp.akeda.ru
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization codehttps://erp.akeda.ru/oauth2/authorize
      Token URLhttps://erp.akeda.ru/oauth2/token
      Scopesakeda:delegate

Path parameters

id, string uuid required

Headers

X-Tenant, string required

Slug выбранного кабинета; кабинет не является юрлицом

Request body

ChatUploadSessionCreate required
name, string required
mime_type, string
size_bytes, integer required
sha256, string

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

Response

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

ChatUploadSession required
id, string uuid required
owner_type, 'conversation' required
owner_id, string uuid
name, string required
mime_type, string required
size_bytes, integer required
sha256, string
status, 'pending' | 'processing' | 'attached' | 'failed' | 'expired' required
failure, string
failure_detail, string
scan_status, 'clean' | 'infected' | 'skipped'
scan_verdict, string
published_ref, string uuid
expires_at, string date-time required
created_at, string date-time required
completed_at, string date-time
upload, ChatUploadInstructions

Changes

    • info

      added the optional property field to the response with the status

    • info

      added the optional property field to the response with the status

    • info

      added the optional property field to the response with the status

    3 more changes in this revision