API Reference

The event7 backend exposes a REST API on FastAPI. All endpoints under /api/v1 require a valid JWT in the Authorization: Bearer <token> header (except when AUTH_ENABLED=false).

Interactive Swagger UI available at /docs on your backend instance.

Registries

Connect, list, health-check, and remove schema registries.

/api/v1/registries

POST/Connect a registry (validates connection, encrypts credentials, stores in DB)
GET/List all registries for the authenticated user
GET/{id}/healthHealth check a specific registry
DELETE/{id}Soft-delete (deactivate) a registry

Schemas

Browse subjects, versions, diff, references, and compatibility.

/api/v1/registries/{id}

GET/subjectsList all subjects with optional enrichments
GET/subjects/{subject}Get latest version of a subject
GET/subjects/{subject}/versionsList version numbers
GET/subjects/{subject}/versions/{v}Get a specific version
GET/subjects/{subject}/versions-detailAll versions with full content
POST/subjects/{subject}Register a new schema
DELETE/subjects/{subject}Delete a subject
GET/subjects/{subject}/diff?v1=X&v2=YField-level diff between two versions
GET/subjects/{subject}/referencesOutgoing schema references
GET/subjects/{subject}/dependentsSchemas that depend on this subject
GET/subjects/{subject}/compatibilityCurrent compatibility mode
POST/subjects/{subject}/compatibility/checkCheck schema compatibility

Schema Validator

Validate a schema before publishing. Combines SR compatibility check, event7 governance rules evaluation, and field-level diff preview in a single report. Stateless — nothing is stored. Verdict: PASS / WARN / FAIL.

/api/v1/registries/{id}

POST/schemas/validateValidate a schema candidate (subject, schema_content, schema_type, compare_version). Returns unified report: compatibility + governance + diff + verdict.

Governance

Event catalog with broker bindings, enrichments (tags, owner, description, classification, data layer).

/api/v1/registries/{id}

GET/catalogFull event catalog with enrichments, broker_types, channel_count, updated_at
GET/catalog/export?format=csvExport catalog as CSV or JSON
GET/subjects/{subject}/enrichmentGet enrichment for a subject
PUT/subjects/{subject}/enrichmentUpdate enrichment (tags, owner, description, classification, data_layer)

Channels

Messaging channels (Kafka topics, RabbitMQ exchanges, Redis streams, etc.) and subject bindings. Supports multi-broker with broker_config JSONB.

/api/v1/registries/{id}

POST/channelsCreate a channel (address, broker_type, resource_kind, messaging_pattern, broker_config)
GET/channelsList channels with optional filters (?broker_type=kafka&data_layer=core)
GET/channels/{channel_id}Get a single channel with its bindings
PUT/channels/{channel_id}Update a channel
DELETE/channels/{channel_id}Delete a channel and its bindings
POST/channels/{channel_id}/bindingsCreate a subject binding (subject_name, binding_strategy, schema_role)
DELETE/channels/{channel_id}/bindings/{binding_id}Remove a subject binding
GET/channels/reverse/{subject}Find all channels bound to a subject
GET/channels/channel-mapAggregated channel map (channels + bindings + status)

Governance Rules

Rules & policies CRUD, governance templates, and scoring. Filter list with query params: subject, scope, kind, category, severity, enforcement_status, source.

/api/v1/registries/{id}

POST/rulesCreate a governance rule or policy
GET/rulesList rules with optional filters (also returns global rules when filtering by subject)
GET/rules/{rule_id}Get a single rule by ID
PUT/rules/{rule_id}Update a rule (partial update, only non-null fields)
DELETE/rules/{rule_id}Delete a rule
POST/rules/templates/{template_id}/applyApply a governance template to registry or subject
GET/governance/scoreGovernance score for registry or subject (?subject=...)

Governance Templates

Built-in + custom rule templates (RAW, CORE, REFINED, APPLICATION layers). Builtin templates have limited editability (description + rules only). Custom templates support full CRUD and cloning.

/api/v1/governance

GET/templatesList all governance templates (builtin + custom)
GET/templates/{id}Get a single template with rule definitions
POST/templatesCreate a custom template (template_name, display_name, description, layer, rules)
PUT/templates/{id}Update a template (builtin: description + rules only; custom: all fields)
DELETE/templates/{id}Delete a custom template (builtin → 403 Forbidden)
POST/templates/{id}/cloneClone any template with a new name (creates a custom copy)

AsyncAPI

Generate, retrieve, edit, export, and monitor AsyncAPI 3.0 specs. Includes dual-mode overview with drift detection.

/api/v1/registries/{id}

GET/asyncapi/overviewDual-mode overview — KPIs (total, documented, ready, raw, coverage) + per-subject status with drift detection (origin, status, sync_status)
POST/subjects/{subject}/asyncapi/generateGenerate spec from schema + enrichments (Kafka bindings, key schema, examples). Stores source hash + version for drift.
GET/subjects/{subject}/asyncapiRetrieve existing spec (cache → DB)
PUT/subjects/{subject}/asyncapiManually update a spec (sets is_auto_generated=false)
DELETE/subjects/{subject}/asyncapiDelete a stored spec
GET/subjects/{subject}/asyncapi/yamlExport spec as YAML

AsyncAPI Import

Import an AsyncAPI v3 spec to create channels, bindings, enrichments, and optionally register schemas. Two-phase: preview (dry-run) then apply. Smart registration routes schemas based on registry type (Apicurio=all, Confluent-like=Kafka only).

/api/v1/registries/{id}

POST/asyncapi/import/previewParse spec and preview what would be created (channels, bindings, enrichments, unknown schemas)
POST/asyncapi/import/applyParse and persist all entities. Set register_schemas=true to push compatible schemas to SR.

EventCatalog Export

Aggregated export endpoint for the generator-event7 EventCatalog plugin. Returns schemas + enrichments + governance scores + rules summary + AsyncAPI specs + channels + teams in a single payload.

/api/v1/registries/{id}

GET/export/eventcatalogFull export: registry info, schemas with content + enrichment + score + rules + asyncapi, channels with bindings, deduplicated teams

AI Agent

LLM-powered commands and actions. Requires OLLAMA_HOST configured. SSE streaming responses.

/api/v1/ai

GET/statusAI agent status (enabled, model, provider)
POST/chatSend a command — returns SSE stream (/health, /schemas, /drift, /catalog, /refs, /asyncapi)
POST/executeExecute a confirmed action (enrich, generate, delete) with confirmation UI

Hosted Registry

Managed Apicurio instances for brokers without a native SR (Redis, RabbitMQ, NATS). Coming soon (currently returns 501).

/api/v1/registries/hosted

POST/Provision a hosted registry
DELETE/{id}Deprovision a hosted registry