Akeda Knowledge spaces API
Модуль knowledge (база знаний) — пространства и дерево страниц
Модуль knowledge (база знаний) — пространства и дерево страниц
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/akeda-ru:akeda-ru-knowledge-spaces-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a 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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Akeda ERP Client Knowledge spaces 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: Knowledge spaces
description: Модуль knowledge (база знаний) — пространства и дерево страниц
paths:
/api/v1/knowledge/spaces:
get:
tags:
- Knowledge spaces
operationId: knowledgeListSpaces
summary: Получить доступные пространства базы знаний
description: Закрытое пространство видно только его участникам; can_manage считается на сервере по владельцу, а не по модульному праву.
security:
- erpUserToken: []
- mcpOAuth:
- akeda:delegate
x-akeda-module: knowledge
x-akeda-release-stage: preview
x-akeda-audience: external
x-akeda-permission: knowledge:read
parameters:
- $ref: '#/components/parameters/TenantHeader'
- name: include_archived
in: query
description: Показать архивные пространства
schema:
type: boolean
default: false
responses:
'200':
description: Видимые пространства
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/KnowledgeSpace'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
post:
tags:
- Knowledge spaces
operationId: knowledgeCreateSpace
summary: Создать пространство базы знаний
description: Создатель сразу становится владельцем пространства; без владельца-человека распоряжаться им было бы некому.
security:
- erpUserToken: []
- mcpOAuth:
- akeda:delegate
x-akeda-module: knowledge
x-akeda-release-stage: preview
x-akeda-audience: external
x-akeda-permission: knowledge:admin
parameters:
- $ref: '#/components/parameters/TenantHeader'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/KnowledgeSpaceInput'
responses:
'201':
description: Созданное пространство
content:
application/json:
schema:
$ref: '#/components/schemas/KnowledgeSpace'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'409':
$ref: '#/components/responses/Conflict'
/api/v1/knowledge/spaces/{id}/tree:
parameters:
- $ref: '#/components/parameters/TenantHeader'
- $ref: '#/components/parameters/KnowledgeSpaceID'
get:
tags:
- Knowledge spaces
operationId: knowledgeGetSpaceTree
summary: Получить дерево страниц пространства
description: Черновики попадают в ответ только редактору и только при published_only=false; недоступная страница не раскрывает ни заголовка, ни факта существования.
security:
- erpUserToken: []
- mcpOAuth:
- akeda:delegate
x-akeda-module: knowledge
x-akeda-release-stage: preview
x-akeda-audience: external
x-akeda-permission: knowledge:read
parameters:
- name: published_only
in: query
description: Только опубликованные страницы
schema:
type: boolean
default: false
responses:
'200':
description: Дерево страниц пространства
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/KnowledgeNode'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/api/v1/knowledge/spaces/{id}:
put:
tags:
- Knowledge spaces
operationId: knowledgeUpdateSpace
summary: Изменить пространство базы знаний
description: 'Меняются название, описание и иконка. Поле slug тело принимает, но адрес пространства оно не переписывает — адрес выдаётся один раз при создании. Правит только владелец пространства: модульный knowledge:admin в закрытое пространство не входит. В ответе пересобирается строка пространства, поэтому is_restricted, can_manage, page_count и is_pinned в нём не пересчитываются — их берут из списка пространств.'
security:
- erpUserToken: []
- mcpOAuth:
- akeda:delegate
x-akeda-module: knowledge
x-akeda-release-stage: preview
x-akeda-audience: external
x-akeda-permission: knowledge:write
parameters:
- $ref: '#/components/parameters/TenantHeader'
- name: id
in: path
required: true
description: UUID пространства базы знаний
schema:
$ref: '#/components/schemas/UUID'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/KnowledgeSpaceInput'
responses:
'200':
description: Изменённое пространство
content:
application/json:
schema:
$ref: '#/components/schemas/KnowledgeSpace'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
delete:
tags:
- Knowledge spaces
operationId: knowledgeDeleteSpace
summary: Удалить пространство базы знаний
description: 'Удаление безвозвратное: вместе с пространством уходят все его страницы со всей историей редакций, состав участников, привязки меток, обложка и файлы страниц в объектном хранилище. Корзина есть у страницы, у пространства её нет. Удаляет владелец пространства.'
security:
- erpUserToken: []
- mcpOAuth:
- akeda:delegate
x-akeda-module: knowledge
x-akeda-release-stage: preview
x-akeda-audience: external
x-akeda-permission: knowledge:write
parameters:
- $ref: '#/components/parameters/TenantHeader'
- name: id
in: path
required: true
description: UUID пространства базы знаний
schema:
$ref: '#/components/schemas/UUID'
responses:
'204':
description: Пространство удалено
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
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'
Conflict:
description: Конфликт версии, идемпотентности или бизнес-состояния
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
KnowledgeTag:
type: object
additionalProperties: false
required:
- id
- name
- color
- created_by
- created_at
properties:
id:
$ref: '#/components/schemas/UUID'
name:
type: string
color:
type: string
created_by:
type: integer
format: int64
created_at:
type: string
format: date-time
KnowledgeRevision:
type: object
additionalProperties: false
required:
- id
- node_id
- revision_no
- title
- schema_version
- content
- plain_text
- author_id
- created_at
properties:
id:
$ref: '#/components/schemas/UUID'
node_id:
$ref: '#/components/schemas/UUID'
revision_no:
type: integer
title:
type: string
schema_version:
type: integer
content:
$ref: '#/components/schemas/KnowledgeDocument'
plain_text:
type: string
description: Производное текстовое представление для поиска и ответов
author_id:
type: integer
format: int64
created_at:
type: string
format: date-time
published_at:
type: string
format: date-time
KnowledgeSpace:
type: object
additionalProperties: false
required:
- id
- name
- slug
- description
- icon
- sort_order
- is_archived
- is_restricted
- business_id
- can_manage
- has_cover
- page_count
- created_by
- created_at
- updated_at
- is_pinned
properties:
id:
$ref: '#/components/schemas/UUID'
name:
type: string
slug:
type: string
description:
type: string
icon:
type: string
sort_order:
type: integer
is_archived:
type: boolean
is_restricted:
type: boolean
description: Закрытое пространство видно только участникам его списка
can_manage:
type: boolean
description: Смотрящий вправе вести пространство; считается сервером по владельцу
business_id:
oneOf:
- $ref: '#/components/schemas/UUID'
- type: 'null'
description: 'Бизнес пространства: его видят, ищут и цитируют в ответах помощника участники, чья область доступа касается бизнеса, и поимённо выданные. null — пространство всего кабинета'
has_cover:
type: boolean
page_count:
type: integer
created_by:
type: integer
format: int64
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
is_pinned:
type: boolean
KnowledgeSpaceInput:
type: object
additionalProperties: false
required:
- name
properties:
name:
type: string
minLength: 1
slug:
type: string
description: Адрес; выводится из названия, когда не задан
description:
type: string
icon:
type: string
description: Имя иконки Lucide; по умолчанию book-open
business_id:
oneOf:
- $ref: '#/components/schemas/UUID'
- type: 'null'
description: Бизнес пространства. Поле не передано — не менять (у нового — единственный бизнес области доступа или весь кабинет); null — пространство всего кабинета. Бизнес вне области доступа — 403 knowledge.business_forbidden
KnowledgeNode:
type: object
additionalProperties: false
required:
- id
- space_id
- title
- slug
- icon
- sort_order
- status
- owner_id
- version
- created_by
- created_at
- updated_at
- is_favorite
- is_stale
properties:
id:
$ref: '#/components/schemas/UUID'
space_id:
$ref: '#/components/schemas/UUID'
parent_id:
$ref: '#/components/schemas/UUID'
title:
type: string
slug:
type: string
icon:
type: string
sort_order:
type: integer
status:
type: string
description: 'Состояние страницы: draft, review, published или archived'
owner_id:
type: integer
format: int64
current_draft_revision_id:
$ref: '#/components/schemas/UUID'
published_revision_id:
$ref: '#/components/schemas/UUID'
version:
type: integer
format: int64
description: Версия страницы для optimistic locking следующего изменения
verify_at:
type: string
format: date-time
submitted_revision_id:
$ref: '#/components/schemas/UUID'
reviewer_id:
type: integer
format: int64
submitted_by:
type: integer
format: int64
submitted_at:
type: string
format: date-time
reviewed_by:
type: integer
format: int64
reviewed_at:
type: string
format: date-time
review_note:
type: string
created_by:
type: integer
format: int64
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
is_favorite:
type: boolean
is_stale:
type: boolean
description: Срок подтверждения актуальности истёк
tags:
type: array
items:
$ref: '#/components/schemas/KnowledgeTag'
draft:
$ref: '#/components/schemas/KnowledgeRevision'
published:
$ref: '#/components/schemas/KnowledgeRevision'
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.
KnowledgeDocument:
type: object
description: Канонический блочный документ страницы; редактор читает только эту схему.
required:
- schema
- schema_version
- type
- content
properties:
schema:
type: string
const: akeda.knowledge.document
schema_version:
type: integer
enum:
- 1
- 2
description: Актуальная версия схемы — 2
type:
type: string
const: doc
content:
type: array
items:
type: object
description: Блок документа со своим type и props
description: Блоки страницы
UUID:
type: string
format: uuid
parameters:
KnowledgeSpaceID:
name: id
in: path
required: true
description: UUID пространства базы знаний
schema:
$ref: '#/components/schemas/UUID'
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