Runtime API

The Runtime REST API is generated from a published DomainConfig. The generated OpenAPI contract for the target app is canonical.

OpenAPI

Fetch the contract:

1GET /api/rest/<tenant-id>/<app-id>/openapi

Use the response to discover endpoint names, schemas, auth requirements, response shapes, and errors. Do not infer app-specific endpoint names from another app.

Commands

Published commands become REST endpoints. A command request:

  1. authenticates the caller
  2. checks permissions
  3. validates input
  4. loads decision state
  5. emits events if the command succeeds
  6. returns a structured result

Command handlers validate state and emit events only. Caller-side orchestration belongs in clients, policies, or app services, not inside command handlers.

Batch commands

Batch command execution is useful for controlled automation. Keep batches small and idempotent from the caller’s perspective. If a workflow needs business-level dedupe, model that explicitly.

Projections

Projection endpoints read current state. They support filtering, sorting, pagination, and output shaping according to the projection contract.

See Projection Queries.

Event import

Event import is for migrations, repairs, and controlled operational workflows. Normal user behavior should execute commands.

Projection rebuild

Projection rebuild is for projection definition changes, recovery, and migration work. Verify output after a rebuild and communicate production impact before running it on large event histories.

Adapter call route

The adapter call route exists for controlled platform workflows. Treat it as limited/internal support, not as the normal public app API. External consumers should use commands, projections, webhooks, subscriptions, or a BFF.