openapi: 3.0.3
info:
  title: Cascad360 Core DB Overlay
  version: 1.0.9
paths:
  /v1/admin/db/context:
    get:
      summary: Контекст БД и права пользователя
      description: Права db_* для выбранной datasource/database.
      x-permissions: [db_view]
      x-api-source: core
  /v1/admin/db/tables:
    get:
      summary: Каталог объектов схемы
      x-permissions: [db_view]
      x-api-source: core
  /v1/admin/db/table/{table_name}/structure:
    get:
      summary: Структура таблицы
      x-permissions: [db_view]
      x-api-source: core
  /v1/admin/db/table/{table_name}/rows:
    get:
      summary: Строки таблицы с пагинацией
      x-permissions: [db_view]
      x-api-source: core
    post:
      summary: Добавить строку
      x-permissions: [db_edit]
      x-api-source: core
  /v1/admin/db/table/{table_name}/rows/{pk}:
    patch:
      summary: Обновить строку
      x-permissions: [db_edit]
      x-api-source: core
    delete:
      summary: Удалить строку
      x-permissions: [db_edit]
      x-api-source: core
  /v1/admin/db/sql:
    post:
      summary: SQL-консоль Database Studio
      x-permissions: [db_sql_execute]
      x-api-source: core
  /v1/admin/db/audit:
    get:
      summary: Аудит mutating операций БД
      x-permissions: [db_audit]
      x-api-source: core
  /v1/admin/databases/datasource/{datasource_id}/list:
    get:
      summary: Список БД на datasource
      x-permissions: [db_view, db_service_bind]
      x-api-source: core
