Akeda Files API

Модуль files (файловое хранилище кабинета)

Operations 7

GET /api/v1/files/roots Получить доступные хранилища #
POST /api/v1/files/roots Создать хранилище #
POST /api/v1/files/shortcuts Создать ярлык на внешний ресурс #
POST /api/v1/files/folders Создать папку #
GET /api/v1/files/folders/{id}/entries Получить содержимое папки #
GET /api/v1/files/items/{id} Получить карточку файла #
GET /api/v1/files/search Найти файлы #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/akeda-ru:akeda-ru-files-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

akeda-ru-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Akeda ERP Client Files API
  version: 0.21.0-core-public
  summary: Проверяемый публичный контракт Go API Akeda ERP
  license:
    name: Proprietary
    identifier: LicenseRef-Akeda-Proprietary
  description: 'Этот контракт описывает API Akeda ERP. Полный исходный файл используют

    проверки живых Go-маршрутов, внутренние клиенты и реестр MCP. Скачиваемый

    клиентский контракт в `/docs` содержит только отобранные внешние методы;

    административные методы кабинета показаны отдельно после входа, а

    платформенные операторские методы остаются во внутреннем источнике.

    Стадия `public` означает обещание совместимости; `preview` допускает

    изменение формы. Аудитория, стадия и `security` — разные признаки:

    наличие метода в полном файле само по себе не выдаёт вызывающему право.

    Сервер отдельно проверяет тип токена, кабинет, scope и права на запись.

    Актуальные числа покрытия берите из генерируемой карты маршрутов и

    каталога покрытия, а не из описательного текста.'
servers:
- url: https://erp.akeda.ru
  description: PROD
security:
- erpUserToken: []
- tenantApiKey: []
- mcpOAuth:
  - akeda:delegate
tags:
- name: Files
  description: Модуль files (файловое хранилище кабинета)
paths:
  /api/v1/files/roots:
    get:
      tags:
      - Files
      operationId: filesListRoots
      x-akeda-audience: external
      summary: Получить доступные хранилища
      description: 'Личное хранилище сотрудника заводится при первом обращении. Закрытое хранилище видно только тем, кто перечислен в его правах: перебор идентификаторов не расскажет о чужих папках.'
      security:
      - erpUserToken: []
      - mcpOAuth:
        - akeda:delegate
      x-akeda-module: files
      x-akeda-release-stage: preview
      x-akeda-permission: files:read
      parameters:
      - $ref: '#/components/parameters/TenantHeader'
      responses:
        '200':
          description: Хранилища смотрящего
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                required:
                - roots
                properties:
                  roots:
                    type: array
                    items:
                      $ref: '#/components/schemas/FilesFolder'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
    post:
      tags:
      - Files
      operationId: filesCreateRoot
      x-akeda-audience: external
      summary: Создать хранилище
      description: 'Создатель сразу становится владельцем: закрытое хранилище без владельца потом не откроет никто, кроме суперпользователя платформы.'
      security:
      - erpUserToken: []
      - mcpOAuth:
        - akeda:delegate
      x-akeda-module: files
      x-akeda-release-stage: preview
      x-akeda-permission: files:admin
      parameters:
      - $ref: '#/components/parameters/TenantHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FilesFolderInput'
      responses:
        '201':
          description: Созданное хранилище
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilesFolder'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /api/v1/files/shortcuts:
    post:
      tags:
      - Files
      operationId: filesCreateShortcut
      x-akeda-audience: external
      summary: Создать ярлык на внешний ресурс
      description: Создаёт переносимый .url файл с наследуемыми правами папки. Принимает только HTTP(S) без credentials и управляющих символов; сервер не запрашивает внешний адрес. Доступ к внешнему ресурсу определяет его провайдер.
      security:
      - erpUserToken: []
      - mcpOAuth:
        - akeda:delegate
      x-akeda-module: files
      x-akeda-release-stage: preview
      x-akeda-permission: files:write
      parameters:
      - $ref: '#/components/parameters/TenantHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
              - folder_id
              - name
              - url
              properties:
                folder_id:
                  $ref: '#/components/schemas/UUID'
                name:
                  type: string
                  maxLength: 255
                url:
                  type: string
                  format: uri
                  maxLength: 4096
      responses:
        '201':
          description: Ярлык
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilesFile'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /api/v1/files/folders:
    post:
      tags:
      - Files
      operationId: filesCreateFolder
      x-akeda-audience: external
      summary: Создать папку
      description: Имя, занятое соседом, не отвергается, а дополняется номером — как это делает проводник. Закрытым бывает только диск — is_restricted=true у папки внутри диска отклоняется (422, code=files.subfolder_restricted), папка не создаётся.
      security:
      - erpUserToken: []
      - mcpOAuth:
        - akeda:delegate
      x-akeda-module: files
      x-akeda-release-stage: preview
      x-akeda-permission: files:write
      parameters:
      - $ref: '#/components/parameters/TenantHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FilesFolderInput'
      responses:
        '201':
          description: Созданная папка
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilesFolder'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
  /api/v1/files/folders/{id}/entries:
    get:
      tags:
      - Files
      operationId: filesListEntries
      x-akeda-audience: external
      summary: Получить содержимое папки
      description: Папки и файлы возвращаются одним списком вместе с путём до текущей папки и правами смотрящего.
      security:
      - erpUserToken: []
      - mcpOAuth:
        - akeda:delegate
      x-akeda-module: files
      x-akeda-release-stage: preview
      x-akeda-permission: files:read
      parameters:
      - $ref: '#/components/parameters/TenantHeader'
      - name: id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/UUID'
      - name: q
        in: query
        description: Сузить по имени внутри папки
        schema:
          type: string
      - name: sort
        in: query
        schema:
          type: string
          enum:
          - name
          - size
          - updated
          - type
          default: name
      - name: order
        in: query
        schema:
          type: string
          enum:
          - asc
          - desc
          default: asc
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 500
          default: 200
      - name: offset
        in: query
        schema:
          type: integer
          minimum: 0
          default: 0
      responses:
        '200':
          description: Содержимое папки
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilesListing'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
  /api/v1/files/items/{id}:
    get:
      tags:
      - Files
      operationId: filesGetFile
      x-akeda-audience: external
      summary: Получить карточку файла
      description: Возвращает карточку указанного файла.
      security:
      - erpUserToken: []
      - mcpOAuth:
        - akeda:delegate
      x-akeda-module: files
      x-akeda-release-stage: preview
      x-akeda-permission: files:read
      parameters:
      - $ref: '#/components/parameters/TenantHeader'
      - name: id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/UUID'
      responses:
        '200':
          description: Файл
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilesFile'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
  /api/v1/files/search:
    get:
      tags:
      - Files
      operationId: filesSearch
      x-akeda-audience: external
      summary: Найти файлы
      description: Ищет по именам и по извлечённому из документов тексту в пределах доступного смотрящему.
      security:
      - erpUserToken: []
      - mcpOAuth:
        - akeda:delegate
      x-akeda-module: files
      x-akeda-release-stage: preview
      x-akeda-permission: files:read
      parameters:
      - $ref: '#/components/parameters/TenantHeader'
      - name: q
        in: query
        required: true
        description: Строка поиска
        schema:
          type: string
          minLength: 2
      - name: root_id
        in: query
        description: Сузить одним хранилищем
        schema:
          $ref: '#/components/schemas/UUID'
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 25
      - name: offset
        in: query
        schema:
          type: integer
          minimum: 0
          default: 0
      responses:
        '200':
          description: Найденные файлы
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                required:
                - results
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/FilesSearchHit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  responses:
    BadRequest:
      description: Некорректный запрос или нарушение бизнес-правила
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Сессия, ключ или кабинет не подтверждены
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Текущая роль не имеет требуемого права
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Запись не найдена или не видима текущему пользователю
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnprocessableEntity:
      description: Запрос разобран, но бизнес-значение недопустимо
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    FilesSearchHit:
      type: object
      additionalProperties: false
      required:
      - file
      - matched
      properties:
        file:
          $ref: '#/components/schemas/FilesFile'
        snippet:
          type: string
        matched:
          type: string
          enum:
          - name
          - content
    FilesFolderInput:
      type: object
      additionalProperties: false
      required:
      - name
      properties:
        parent_id:
          $ref: '#/components/schemas/UUID'
        name:
          type: string
          maxLength: 255
        icon:
          type: string
        color:
          type: string
        description:
          type: string
          maxLength: 2000
        kind:
          type: string
          enum:
          - shared
        is_restricted:
          type: boolean
        business_id:
          oneOf:
          - $ref: '#/components/schemas/UUID'
          - type: 'null'
          description: Бизнес общего хранилища (только у верхнего уровня). Поле не передано — не менять (у нового — единственный бизнес области доступа или весь кабинет); null — хранилище всего кабинета. Бизнес вне области доступа — 403 files.business_forbidden
    FilesFolder:
      type: object
      additionalProperties: false
      required:
      - id
      - root_id
      - depth
      - name
      - kind
      - icon
      - color
      - description
      - is_restricted
      - break_inheritance
      - business_id
      - owner_id
      - created_by
      - created_at
      - updated_at
      - can_read
      - can_write
      - can_share
      - can_manage
      - is_favorite
      - folder_count
      - file_count
      - size_bytes
      properties:
        id:
          $ref: '#/components/schemas/UUID'
        parent_id:
          $ref: '#/components/schemas/UUID'
        root_id:
          $ref: '#/components/schemas/UUID'
        depth:
          type: integer
        name:
          type: string
        kind:
          type: string
          enum:
          - shared
          - personal
          description: Личное хранилище принадлежит своему владельцу целиком
        icon:
          type: string
        color:
          type: string
        description:
          type: string
        is_restricted:
          type: boolean
          description: Закрытое хранилище видно только участникам его списка
        break_inheritance:
          type: boolean
          description: Права хранилища на эту папку не действуют
        business_id:
          oneOf:
          - $ref: '#/components/schemas/UUID'
          - type: 'null'
          description: Бизнес хранилища; у вложенной папки — бизнес её хранилища. Хранилище бизнеса видят участники, чья область доступа касается бизнеса, и поимённо выданные; null — хранилище всего кабинета или личное
        owner_id:
          type: integer
          format: int64
        created_by:
          type: integer
          format: int64
        trashed_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        can_read:
          type: boolean
        can_write:
          type: boolean
        can_share:
          type: boolean
          description: Право выпускать внешние ссылки; из открытости хранилища не следует
        can_manage:
          type: boolean
        is_favorite:
          type: boolean
        folder_count:
          type: integer
        file_count:
          type: integer
        size_bytes:
          type: integer
          format: int64
    FilesListing:
      type: object
      additionalProperties: false
      required:
      - folder
      - path
      - entries
      - total
      properties:
        folder:
          $ref: '#/components/schemas/FilesFolder'
        path:
          type: array
          items:
            $ref: '#/components/schemas/FilesBreadcrumb'
        entries:
          type: array
          items:
            $ref: '#/components/schemas/FilesEntry'
        total:
          type: integer
    Error:
      type: object
      additionalProperties: false
      required:
      - detail
      properties:
        detail:
          type: string
          description: One human sentence in the request language (Accept-Language, echoed as Content-Language)
        code:
          type: string
          description: Stable module error code when the endpoint defines one
        field:
          type: string
          description: Request body path of the field the refusal is about, e.g. content.commercial.amount or due_date; present when the endpoint names the field
        reason:
          type: string
          description: Machine code of the field refusal reason, e.g. required, format, total_mismatch; present together with field when the endpoint defines reasons
        request_id:
          type: string
          format: uuid
          description: Case id. Always present on 5xx and on any error produced by the server itself; the same value is returned in the X-Request-ID header and recorded in the access log and the incident. Quote it to support instead of the cause, which the response never carries.
    FilesFile:
      type: object
      additionalProperties: false
      required:
      - id
      - folder_id
      - root_id
      - name
      - extension
      - mime_type
      - size_bytes
      - version_no
      - owner_id
      - created_by
      - created_at
      - updated_at
      - scan_status
      - preview_status
      - has_thumbnail
      - is_favorite
      properties:
        id:
          $ref: '#/components/schemas/UUID'
        folder_id:
          $ref: '#/components/schemas/UUID'
        root_id:
          $ref: '#/components/schemas/UUID'
        name:
          type: string
        external_url:
          type: string
          format: uri
          description: HTTP(S)-адрес внешнего ярлыка; отсутствует у обычных файлов
        extension:
          type: string
        mime_type:
          type: string
        size_bytes:
          type: integer
          format: int64
        version_no:
          type: integer
        version_id:
          $ref: '#/components/schemas/UUID'
        owner_id:
          type: integer
          format: int64
        created_by:
          type: integer
          format: int64
        updated_by:
          type: integer
          format: int64
        trashed_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        scan_status:
          type: string
          enum:
          - pending
          - scanning
          - clean
          - infected
          - skipped
          - error
          description: 'skipped — содержимое крупнее порога проверки: оно выдаётся, но честно помечено непроверенным'
        scan_verdict:
          type: string
        preview_status:
          type: string
          enum:
          - pending
          - processing
          - ready
          - unsupported
          - error
        has_thumbnail:
          type: boolean
        is_favorite:
          type: boolean
        folder_name:
          type: string
        path:
          type: array
          items:
            $ref: '#/components/schemas/FilesBreadcrumb'
    FilesEntry:
      type: object
      additionalProperties: false
      required:
      - kind
      properties:
        kind:
          type: string
          enum:
          - folder
          - file
        folder:
          $ref: '#/components/schemas/FilesFolder'
        file:
          $ref: '#/components/schemas/FilesFile'
    FilesBreadcrumb:
      type: object
      additionalProperties: false
      required:
      - id
      - name
      properties:
        id:
          $ref: '#/components/schemas/UUID'
        name:
          type: string
    UUID:
      type: string
      format: uuid
  parameters:
    TenantHeader:
      name: X-Tenant
      in: header
      required: true
      description: Slug выбранного кабинета; кабинет не является юрлицом
      schema:
        type: string
        minLength: 1
  securitySchemes:
    erpUserToken:
      type: http
      scheme: bearer
      bearerFormat: go_session
      description: Пользовательский ERP token, полученный через ORY Kratos session bridge
    tenantApiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: Tenant-scoped сервисный API-ключ Akeda
    installationToken:
      type: http
      scheme: bearer
      bearerFormat: akeda_installation_token
      description: 'Краткосрочный токен установки приложения (`ai_…`). Выдаёт его человек: публичной двери обмена учётных данных на токен нет и не будет, пока нет брокера долгой половины секрета, асимметричного подтверждения и ограничителя с аудитом неудачных попыток. Токен принимается и в заголовке X-Api-Key, и живёт минуты — вместо показа его ротируют'
    developerSessionToken:
      type: http
      scheme: bearer
      bearerFormat: akeda_developer_session
      description: 'Сессия аккаунта разработчика (`ad_…`). Своя схема, а не пользовательский токен ERP: у разработчика нет кабинета, роли и прав, а хеш этого токена лежит в отдельном хранилище — на кабинетных маршрутах он не находится ничем. Выдаёт его обмен одноразовой ссылки из письма; пароля в этом контуре нет вовсе'
    developerAppKey:
      type: http
      scheme: bearer
      bearerFormat: akeda_developer_app_key
      description: 'Учётные данные приложения (`adk_…`) — это машина конвейера издателя, а не человек. Ключ привязан к ОДНОМУ приложению внешним ключом, и достижимая им поверхность — маршруты `/api/v1/developer` этого приложения. Обменять его на токен установки нельзя: такой двери нет, и ни одного маршрута к данным кабинета за ним не существует. Выпуск, ротацию и отзыв учётных данных этот ключ не выполняет: ключ, умеющий выпустить следующий ключ, не отзывается никогда. Значение показывается один раз, при выдаче; в хранилище лежит хеш'
    mcpOAuth:
      type: oauth2
      description: OAuth 2.1 delegation для MCP; кабинетные права проверяются на каждом вызове
      flows:
        authorizationCode:
          authorizationUrl: https://erp.akeda.ru/oauth2/authorize
          tokenUrl: https://erp.akeda.ru/oauth2/token
          scopes:
            akeda:delegate: Делегировать текущие пользовательские права MCP-подключению
x-akeda-contract-coverage:
- dashboard-metrics
- tasks-lifecycle
- tasks-collaboration
- tasks-workflow
- tasks-organization
- tasks-automation
- tasks-planning
- tasks-project-hub
- tasks-files
- calendar-events
- calendar-availability
- calendar-booking
- calendar-notifications
- calendar-connectors
- chat-conversations
- chat-messages
- chat-receipts
- chat-mentions
- chat-realtime
- core-directories
- core-folders
- core-contacts
- core-products
- core-documents
- core-orders
- core-registers
- core-accounting
- core-ledger
- core-items
- core-employees
- core-employee-operations
- core-currency-rates
- core-preferences
- core-ui-state
- core-external-refs
- core-product-imports
- core-product-exports
- core-gl-opening-imports
- core-reference
- core-change-feed
- finance-accounts
- finance-statements
- finance-transactions
- finance-connectors
- finance-connector-sync
- finance-requisites
- finance-counterparty-terms
- finance-operations
- finance-settlements
- finance-trade
- finance-exchange
- finance-imports
- finance-payment-calendar
- finance-pnl-layouts
- finance-registers
- finance-reports
- crm-pipelines
- crm-deals
- crm-leads
- crm-customers
- crm-links
- crm-inbox
- crm-automation
- crm-analytics
- knowledge-spaces
- knowledge-pages
- knowledge-access
- knowledge-files
- knowledge-search
- files-drives
- files-content
- files-access
- files-uploads
- files-shares
- stock-documents
- stock-inventory
- stock-warehouses
- stock-handling-units
- stock-batches
- stock-product-units
- stock-references
- stock-imports
- stock-exports
- stock-reports
- stock-valuation
- stock-reorder-rules
- stock-settings
- stock-purchasing
- marking-settings
- marking-connections
- marking-products
- marking-codes
- marking-labels
- marking-stock-codes
- marking-orders
- marking-gismt-documents
- marking-boxes
- marketplace-stores
- marketplace-ozon
- marketplace-wildberries
- marketplace-yandex
- marketplace-product-groups
- marketplace-accounting
- marketplace-catalog
- settings-companies
- settings-roles
- settings-members
- settings-fields
- settings-api-keys
- finance-payroll
- finance-report-details
- knowledge-tags
- knowledge-revisions
- knowledge-approval
- chat-attachments
- chat-reactions
- chat-folders
- platform-apps
- platform-app-installations
- platform-app-tokens
- platform-app-deliveries
- platform-app-publishers
- platform-app-publication
- platform-app-rollouts
- platform-app-runtime
- platform-app-access
- platform-app-blocks
- platform-demo-data
- billing-usage
- platform-analytics
- finance-staffing
- platform-tenants
- platform-users
- platform-access
- platform-mcp-publication
- platform-incidents
- platform-health
- settings-apps
- docflow-connections
- docflow-mirror
- docflow-signing
- docflow-actions
- docflow-outgoing
- docflow-intake
- docflow-flow
- docflow-approvals
- docflow-flow-accounting
- mail-accounts
- mail-folders
- mail-messages
- mail-rules
- mail-outbound
- mail-attachments
- billing-plans
- billing-subscriptions
- billing-invoices
- billing-analytics
- settings-subscription
- billing-payments
- billing-public
x-akeda-docs-path: /docs
x-akeda-default-release-stage: internal
x-akeda-default-audience: operator