Backend claims
One BackendClaim provisions collections, buckets and functions and returns an emitted SDK config (endpoint + API key + collection list). An existing app is rejected, not replaced.
POST /api/v1/claimsSS-11 · Backends from one declaration
Declare a backend; get collections, functions and an SDK.
What it does
Provision a complete backend from a single declaration: schema-bound collections with fail-closed row policies, declared buckets, and Knative-semantics functions with scale-to-zero and per-invocation metering. Production engines — Hasura, Directus, Cosmo, Temporal, Authentik, RustFS — are composed automatically as fail-loud adapters (BAAS16), reused, never installed in parallel.
In-mesh base http://ss-11-baas.shared-services.svc.cluster.local:8011 · auth is an SS-01 bearer token + X-Tenant-Id on every /api/v1 route.
Sub-capabilities
One BackendClaim provisions collections, buckets and functions and returns an emitted SDK config (endpoint + API key + collection list). An existing app is rejected, not replaced.
POST /api/v1/claimsDeclared fields drive generated CRUD validation; row policies (tenant / owner / role) are enforced fail-closed on every read and write — a denied row reads as absent.
POST /api/v1/apps/{app}/collectionsKnative-semantics execution: scale-to-zero, at-least-once delivery deduped by event id, per-function DLQ and per-invocation metering.
POST /api/v1/apps/{app}/functions/{fn}/invokeDiff a desired claim against current state, get a plan hash, then apply with optimistic concurrency; destructive actions need an explicit opt-in.
POST /api/v1/apps/{app}/applyCollections track into Hasura, studio collections into Directus, subgraphs into the Cosmo federated graph — each recorded as an EngineBinding, run through the SS-12 workflow runner when wired.
POST /api/v1/apps/{app}/enginesWorked example
One declaration yields collections, buckets, functions and an SDK config. Row policies are enforced fail-closed the moment data flows.
/api/v1/claimsReturns { endpoint, api_key, collections } and composes engines best-effort.
/api/v1/apps/{app}/collectionsDeclared fields + an owner/tenant/role row policy.
/api/v1/apps/{app}/collections/{coll}/recordsOwner field stamped from the caller's subject.
/api/v1/apps/{app}/functions/{fn}/invokeCold-start flag + compute ms; a failure lands on the DLQ.
/api/v1/apps/{app}/usageInvocations, cold starts, compute ms — deduped, never double-counted.
Endpoint catalog
Real method + path from services/baas/openapi.json. The full contract, including ops endpoints, is the 21-operation surface.
/api/v1/claimsidempotentProvision a complete backend from one declaration/api/v1/appsCreate an empty tenant-scoped backend namespace/api/v1/apps/{app}/planDiff a desired claim → the plan apply would take/api/v1/apps/{app}/applyApply a plan, creating a new revision/api/v1/apps/{app}/revisionsList the app's applied revisions/api/v1/apps/{app}/collectionsDefine a schema-bound collection with row policies/api/v1/apps/{app}/collections/{coll}/recordsCreate a record (schema-validated, owner-stamped)/api/v1/apps/{app}/collections/{coll}/recordsList records (PostgREST-style filters, policy-filtered)/api/v1/apps/{app}/collections/{coll}/records/{id}Fetch a record (denied row reads as 404)/api/v1/apps/{app}/collections/{coll}/records/{id}Update a record (policy-enforced)/api/v1/apps/{app}/collections/{coll}/records/{id}Delete a record (policy-enforced)/api/v1/apps/{app}/collections/{coll}/feedPolicy-filtered change feed (resumable cursor)/api/v1/apps/{app}/functionsList function statuses (0 instances = scaled to zero)/api/v1/apps/{app}/functions/{fn}/invokeHTTP trigger with an optional JSON payload/api/v1/apps/{app}/functions/{fn}/eventsBus→function delivery (dedup by event_id)/api/v1/apps/{app}/functions/{fn}/invocationsA function's execution history/api/v1/apps/{app}/functions/{fn}/dlqDead-lettered deliveries + reasons/api/v1/apps/{app}/usagePer-function metering for the SS-10 usage line/api/v1/enginesThe engine catalog (Hasura, Directus, Cosmo, …)/api/v1/apps/{app}/enginesidempotentCompose/refresh the app's engine bindings/api/v1/apps/{app}/enginesRead the app's stored engine bindingsArchitecture placement
BaaS application platform does not reimplement the platform — it composes it. These are the services it leans on and the seams between them.
Realm/JWT/role wiring on every claim; row policies key off the edge-stamped subject and roles.
Declared buckets are SS-02 bucket claims — storage is reused, never a parallel install.
Engine compose steps run through the existing SS-12 workflow bridge when wired (durable, idempotent).
Bus-triggered functions dedupe on event id; the change feed's push delivery rides SS-16.
A SkyForge app can front a BaaS backend as its data plane, deployed on the same governed spine.