Knowledge files

Завершить загрузку файла на страницу

Changed on

Проверяет, что файл лёг по выданному адресу: право записи на страницу, размер, контрольную сумму (если заявлена) и антивирус; подменённый после проверки файл отклоняется. Затем прикрепляет файл к странице с id сессии; в поисковый разбор идёт только чистый файл. Повтор возвращает тот же файл. 409 transfer.not_uploaded — байтов ещё нет; 422 transfer.infected — найдена угроза, файл удалён; 503 transfer.scanner_unavailable — антивирус недоступен, повторите позже.

post/api/v1/knowledge/upload-sessions/{sessionId}/finish

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

sessionId, string uuid required

UUID сессии загрузки

Headers

X-Tenant, string required

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

Request body

EmptyObject required

Response

Прикреплённый файл

KnowledgeAsset required
id, string uuid required
space_id, string uuid required
node_id, string uuid required
name, string required
mime_type, string required
size_bytes, integer required
content_sha256, string required
processing_status, string required

Разбор файла для индекса: pending, processing, ready, failed или unsupported

scan_status, 'pending' | 'clean' | 'infected' | 'skipped' required

Вердикт антивируса. В поисковый разбор идёт только clean; skipped — файл антивирус не проверял

parser_name, string
parser_version, string
processing_error, string
processed_at, string date-time
uploaded_by, integer required
created_at, string date-time required
updated_at, string date-time required

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

    11 more changes in this revision