HTTP API
Endpoints, request bodies, responses, and data shapes exposed by Rad.
The Rad wire protocol: a small JSON over HTTP surface that clients and a Rad server speak to each other.
Errors use RFC 7807 Problem Details. Branch on the stable code field rather than parsing an error message.
Endpoints
Meta
Liveness and schema introspection.
| Method | Path | Purpose |
|---|---|---|
GET | /health | Check that the server is alive. |
GET | /info | Describe this database. |
GET | /tables | List the tables in the database. |
GET /health
A cheap liveness probe that touches no storage. It always returns 200
with a small status body while the process is serving, so it is safe to
use as a readiness check or a rad:// reachability test before opening
a connection.
Responses
| Status | Body | Meaning |
|---|---|---|
200 | application/json Health | The server is alive. |
default | application/problem+json Problem | Something went wrong inside the server that was not the caller's fault. |
GET /info
Return stable metadata for the database behind this endpoint. mode
tells management tools whether catalog changes are available directly
through the API or are owned by rad.schema.yaml migrations.
schema_version identifies the latest committed catalog state, and
schema_version_at reports when that version committed. location is
the server's configured storage location and is intended for local
development and administrative tooling.
Responses
| Status | Body | Meaning |
|---|---|---|
200 | application/json DatabaseInfo | Metadata about the database behind this endpoint. |
default | application/problem+json Problem | Something went wrong inside the server that was not the caller's fault. |
GET /tables
Return every table currently defined in the catalog, along with its columns and primary key. This reflects the schema as it exists right now, after the most recent successful migration. An empty database returns an empty list, not an error.
Use this to introspect a running server without access to the original
rad.schema.yaml file.
Responses
| Status | Body | Meaning |
|---|---|---|
200 | application/json TableList | The current set of tables. |
default | application/problem+json Problem | Something went wrong inside the server that was not the caller's fault. |
Schema
Reconciling the database with a rad.schema.yaml file.
| Method | Path | Purpose |
|---|---|---|
POST | /schema/compatibility | Verify an exact generated-client schema identity. |
POST | /schema/diff | Plan and preflight a desired schema without changing anything. |
POST | /schema/migrate | Start or recover reconciliation with a desired schema. |
GET | /schema | Return the current accepted schema. |
POST /schema/compatibility
Verify an exact generated-client schema identity.
Request body
| Content type | Type | Required | Description |
|---|---|---|---|
application/json | SchemaCompatibilityRequest |
Responses
| Status | Body | Meaning |
|---|---|---|
204 | No body | The operation succeeded and there is no body to return. |
422 | application/problem+json Problem | The request was well formed but failed validation against the catalog. |
default | application/problem+json Problem | Something went wrong inside the server that was not the caller's fault. |
POST /schema/diff
This is an advisory point-in-time plan. The planner may account for matching durable work already in progress and omit a duplicate transition-start statement. Apply replans against current state and returns the authoritative transition identities accepted for the migration; diff does not return durable transition handles.
Request body
| Content type | Type | Required | Description |
|---|---|---|---|
application/json | SchemaRequest |
Responses
| Status | Body | Meaning |
|---|---|---|
200 | application/json SchemaDiffResult | The semantic diff, catalog PIR, and preflight findings. |
422 | application/problem+json Problem | The request was well formed but failed validation against the catalog. |
default | application/problem+json Problem | Something went wrong inside the server that was not the caller's fault. |
POST /schema/migrate
The server parses the desired schema, computes and preflights its
semantic diff, and atomically commits immediate catalog work plus any
durable online transition starts. The response is ready only when
the current canonical schema equals desired_hash; otherwise it is
converging and returns the transition identities to observe through
the administrative API. Repeating the same desired-schema request
recovers matching in-flight transitions instead of duplicating them.
Destructive findings require accept_data_loss; blocking findings can
never be bypassed.
Request body
| Content type | Type | Required | Description |
|---|---|---|---|
application/json | SchemaMigrateRequest |
Responses
| Status | Body | Meaning |
|---|---|---|
200 | application/json SchemaMigrateResult | The committed accepted schema and its identity. |
409 | application/problem+json Problem | The write lost an optimistic race; an immediate retry may win. |
422 | application/problem+json Problem | The request was well formed but failed validation against the catalog. |
default | application/problem+json Problem | Something went wrong inside the server that was not the caller's fault. |
GET /schema
Return the committed canonical schema together with its monotonic version and canonical hash.
Responses
| Status | Body | Meaning |
|---|---|---|
200 | application/json SchemaState | The current accepted schema and identity. |
default | application/problem+json Problem | Something went wrong inside the server that was not the caller's fault. |
Administration
Inspecting and controlling durable database maintenance work.
| Method | Path | Purpose |
|---|---|---|
POST | /schema/transitions/{transition}/cancel | Cancel one durable online schema transition. |
GET | /schema/transitions/{transition} | Inspect one durable online schema transition. |
GET | /schema/transitions | List durable online schema transitions. |
POST /schema/transitions/{transition}/cancel
Atomically invalidate worker ownership, remove the transition's foreground write obligations, and schedule partial physical state for reclamation. Cancellation is idempotent for an already-cancelled transition. Ready and failed transitions reject cancellation because they require deletion or cleanup instead. This administrative transaction cannot be interleaved with application statements in a PIR program and is available in both catalog management modes.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
transition | path | string | Yes | The durable transition identity returned when the work started. |
Responses
| Status | Body | Meaning |
|---|---|---|
200 | application/json TransitionControl | The transition's durable administrative state. |
404 | application/problem+json Problem | The addressed resource, such as a transaction, does not exist. |
409 | application/problem+json Problem | The write lost an optimistic race; an immediate retry may win. |
422 | application/problem+json Problem | The request was well formed but failed validation against the catalog. |
default | application/problem+json Problem | Something went wrong inside the server that was not the caller's fault. |
GET /schema/transitions/{transition}
Return the current durable identity and lifecycle state plus advisory progress and retained-work pressure. The observation is read from one coherent storage snapshot and does not claim or advance a worker.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
transition | path | string | Yes | The durable transition identity returned when the work started. |
Responses
| Status | Body | Meaning |
|---|---|---|
200 | application/json TransitionControl | The transition's durable administrative state. |
404 | application/problem+json Problem | The addressed resource, such as a transaction, does not exist. |
default | application/problem+json Problem | Something went wrong inside the server that was not the caller's fault. |
GET /schema/transitions
Return a coherent administrative snapshot of online schema work, including terminal transitions retained for diagnostics. Optional kind and state filters are applied to that snapshot. This endpoint never claims a worker or advances transition progress and is available in both direct and schema-managed catalog modes.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
kind | query | TransitionKind | Return only transitions using this physical protocol. | |
state | query | TransitionState | Return only transitions in this durable lifecycle state. |
Responses
| Status | Body | Meaning |
|---|---|---|
200 | application/json TransitionList | A coherent snapshot of durable schema transitions. |
default | application/problem+json Problem | Something went wrong inside the server that was not the caller's fault. |
Catalog
Imperative catalog mutation: creating, updating, and deleting tables, columns, and indexes over the API. Available only on directly managed databases; a schema-managed database rejects every operation in this group with an invalid problem, since its catalog is owned by rad.schema.yaml migrations.
| Method | Path | Purpose |
|---|---|---|
DELETE | /tables/{table}/columns/{column} | Delete a column. |
PATCH | /tables/{table}/columns/{column} | Update a column. |
POST | /tables/{table}/columns | Create a column on a table. |
DELETE | /tables/{table}/indexes/{index} | Delete an index. |
POST | /tables/{table}/indexes | Create an index on a table. |
DELETE | /tables/{table} | Delete a table. |
PATCH | /tables/{table} | Update a table. |
POST | /tables | Create a table. |
DELETE /tables/{table}/columns/{column}
Remove a column. Stored values for it become unreachable. A column used by the primary key, an index, or a foreign key cannot be deleted; delete the index or foreign key holder first. On a schema-managed database this operation is always rejected.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
table | path | string | Yes | The table's current name. |
column | path | string | Yes | The column's current name. |
Responses
| Status | Body | Meaning |
|---|---|---|
200 | application/json TableInfo | The table's definition after the mutation was applied. |
409 | application/problem+json Problem | The write lost an optimistic race; an immediate retry may win. |
422 | application/problem+json Problem | The request was well formed but failed validation against the catalog. |
default | application/problem+json Problem | Something went wrong inside the server that was not the caller's fault. |
PATCH /tables/{table}/columns/{column}
Update a column's properties. The only updatable property today is
name; changing a column's type or nullability is not supported. A
name change rewrites every metadata reference to the column (primary
key, indexes, foreign keys), and rows are keyed by column ID, so no
data is touched. On a schema-managed database this operation is
always rejected.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
table | path | string | Yes | The table's current name. |
column | path | string | Yes | The column's current name. |
Request body
| Content type | Type | Required | Description |
|---|---|---|---|
application/json | ColumnUpdateProps |
Responses
| Status | Body | Meaning |
|---|---|---|
200 | application/json TableInfo | The table's definition after the mutation was applied. |
409 | application/problem+json Problem | The write lost an optimistic race; an immediate retry may win. |
422 | application/problem+json Problem | The request was well formed but failed validation against the catalog. |
default | application/problem+json Problem | Something went wrong inside the server that was not the caller's fault. |
POST /tables/{table}/columns
Append a column. Because existing rows have no value for it, the
column must be nullable or carry a literal default; generator
defaults (uuid(), now_ms()) are rejected on new columns of
existing tables since they would produce a different value on every
read of an old row. On a schema-managed database this operation is
always rejected.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
table | path | string | Yes | The table's current name. |
Request body
| Content type | Type | Required | Description |
|---|---|---|---|
application/json | ColumnDef |
Responses
| Status | Body | Meaning |
|---|---|---|
200 | application/json TableInfo | The table's definition after the mutation was applied. |
409 | application/problem+json Problem | The write lost an optimistic race; an immediate retry may win. |
422 | application/problem+json Problem | The request was well formed but failed validation against the catalog. |
default | application/problem+json Problem | Something went wrong inside the server that was not the caller's fault. |
DELETE /tables/{table}/indexes/{index}
Remove an index from the catalog. Its entries become unreachable; index IDs are never reused. Queries that would have used it fall back to other access paths. On a schema-managed database this operation is always rejected.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
table | path | string | Yes | The table's current name. |
index | path | string | Yes | The index's name. |
Responses
| Status | Body | Meaning |
|---|---|---|
200 | application/json TableInfo | The table's definition after the mutation was applied. |
409 | application/problem+json Problem | The write lost an optimistic race; an immediate retry may win. |
422 | application/problem+json Problem | The request was well formed but failed validation against the catalog. |
default | application/problem+json Problem | Something went wrong inside the server that was not the caller's fault. |
POST /tables/{table}/indexes
Register a secondary index and backfill entries for every existing
row, atomically: the index never becomes visible without its
entries. Backfilling a unique index over data that already contains
duplicates fails with an invalid problem; retrying cannot succeed
until the data changes; and the registration is rolled back with
it. On a schema-managed database this operation is always rejected.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
table | path | string | Yes | The table's current name. |
Request body
| Content type | Type | Required | Description |
|---|---|---|---|
application/json | IndexInfo |
Responses
| Status | Body | Meaning |
|---|---|---|
200 | application/json TableInfo | The table's definition after the mutation was applied. |
409 | application/problem+json Problem | The write lost an optimistic race; an immediate retry may win. |
422 | application/problem+json Problem | The request was well formed but failed validation against the catalog. |
default | application/problem+json Problem | Something went wrong inside the server that was not the caller's fault. |
DELETE /tables/{table}
Remove a table from the catalog. Its rows and index entries become unreachable; table IDs are never reused. A table that another table references through a foreign key cannot be deleted until the referencing table goes first (self-references do not count). On a schema-managed database this operation is always rejected.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
table | path | string | Yes | The table's current name. |
Responses
| Status | Body | Meaning |
|---|---|---|
204 | No body | The operation succeeded and there is no body to return. |
409 | application/problem+json Problem | The write lost an optimistic race; an immediate retry may win. |
422 | application/problem+json Problem | The request was well formed but failed validation against the catalog. |
default | application/problem+json Problem | Something went wrong inside the server that was not the caller's fault. |
PATCH /tables/{table}
Update a table's properties. The only updatable property today is
name: data keys use the table's ID, so a name change is
metadata-only and instantaneous, and foreign keys referencing the
table are unaffected. A name that is already taken is rejected with
an invalid problem. On a schema-managed database this operation is
always rejected.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
table | path | string | Yes | The table's current name. |
Request body
| Content type | Type | Required | Description |
|---|---|---|---|
application/json | TableUpdateProps |
Responses
| Status | Body | Meaning |
|---|---|---|
200 | application/json TableInfo | The table's definition after the mutation was applied. |
409 | application/problem+json Problem | The write lost an optimistic race; an immediate retry may win. |
422 | application/problem+json Problem | The request was well formed but failed validation against the catalog. |
default | application/problem+json Problem | Something went wrong inside the server that was not the caller's fault. |
POST /tables
Define a new table in one call: columns, primary key, and optionally
indexes and foreign keys, exactly as a rad.schema.yaml entry would. Stable
schema IDs may be supplied or are assigned by the catalog, and the
whole definition commits
atomically; a rejected definition leaves nothing behind, including
the name.
Foreign keys may reference existing tables or the table being created
(self-references), and must target the referenced table's full
primary key. A definition that fails validation; duplicate or
missing name, unsupported column type, nullable primary key column,
index or key over unknown columns; is rejected with an invalid
problem. On a schema-managed database this operation is always
rejected.
Request body
| Content type | Type | Required | Description |
|---|---|---|---|
application/json | TableDef |
Responses
| Status | Body | Meaning |
|---|---|---|
200 | application/json TableInfo | The table's definition after the mutation was applied. |
409 | application/problem+json Problem | The write lost an optimistic race; an immediate retry may win. |
422 | application/problem+json Problem | The request was well formed but failed validation against the catalog. |
default | application/problem+json Problem | Something went wrong inside the server that was not the caller's fault. |
Data
Reading and writing rows against committed state.
| Method | Path | Purpose |
|---|---|---|
POST | /execute | Run an execution program. |
POST /execute
Execute a program: an ordered list of named statements run as one
atomic transaction. Each statement is a query, create, update,
or delete over an LIR relation, and evaluates against the
transaction's snapshot plus the effects of all preceding statements.
A statement's result is available to later statements, by name,
through an LIR ref; statement names share the binding namespace.
Mutations consume relations rather than literal rows: create inserts
a relation's rows, update and delete identify target rows by the
relation's primary-key columns. A literal row is simply a one-row
rows relation.
Exactly one statement's result is returned, named by result (or the
sole statement of a single-statement program). The response also
carries a per-statement summary of affected row counts. If any
statement fails validation or execution, or the commit loses a
serializable race, the whole program fails and no effects become
visible; a failed statement is named in the error.
The program envelope is validated before binding, and each statement's LIR relation against the independent LIR schema. Binding then resolves tables, columns, scopes, and statement references (which must point at earlier statements).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
show-plan | query | boolean | When true, the response carries the query plan for each statement - the physical plan and the planner's access-path decisions; as free-form JSON under plan, alongside the result (and on the problem when a statement fails after planning). | |
dry-run | query | boolean | When true, bind and plan every statement but execute none: no writes, no result. With show-plan this returns the plan only; alone it is a "will this bind and plan?" validation that returns an empty success. |
Request body
| Content type | Type | Required | Description |
|---|---|---|---|
application/json | Program |
Responses
| Status | Body | Meaning |
|---|---|---|
200 | application/json ProgramResult | The result statement's datum plus a per-statement summary. |
400 | application/problem+json Problem | The request body was malformed or could not be decoded. |
409 | application/problem+json Problem | The write lost an optimistic race; an immediate retry may win. |
422 | application/problem+json Problem | The request was well formed but failed validation against the catalog. |
default | application/problem+json Problem | Something went wrong inside the server that was not the caller's fault. |
Data shapes
These reusable objects appear in request bodies, responses, and error details.
ColumnDef
A column definition for a direct catalog create operation.
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | An optional stable logical identity; direct mode allocates one when omitted. Format: int64. | |
name | string | Yes | |
type | string | Yes | The column's storage type, one of text, int64, float64, or bool. |
nullable | boolean | ||
format | string | An optional semantic hint such as uuid or unix_ms. | |
default | ColumnDefault |
ColumnDefault
A column default, applied when an insert omits the column: either a
builtin generator named by func (uuid on text columns, now_ms
on int64 columns) or a literal value of the column's type. Exactly
one of the two is set.
| Field | Type | Required | Description |
|---|---|---|---|
func | string | A builtin generator, uuid or now_ms. | |
value | value | A literal of the column's type. |
ColumnInfo
One column of a table, as reported by introspection.
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The stable logical column identity within its table. Format: int64. |
name | string | Yes | |
type | string | Yes | The column's storage type, one of text, int64, float64, or bool. |
nullable | boolean | ||
format | string | An optional semantic hint such as uuid or unix_ms. | |
default | ColumnDefault |
ColumnUpdateProps
The column properties to update.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The column's new name. |
ConflictContext
Schema-level identity for a raced object, when resolvable.
| Field | Type | Required | Description |
|---|---|---|---|
object | ConflictObject | ||
table | string | ||
index | string | ||
operation | ConflictOperation |
ConflictObject
ConflictOperation
ConflictProblem
DatabaseInfo
Stable metadata about a Rad database.
| Field | Type | Required | Description |
|---|---|---|---|
mode | direct | schema | Yes | The database's catalog management mode: direct (the catalog is mutable over this API) or schema (rad.schema.yaml migrations own the catalog and the imperative catalog operations are rejected). |
schema_version | integer | Yes | The monotonic version of the committed schema. A fresh database starts at zero. Each catalog change in direct mode increments it once, including each reconciler step; an entire schema-managed migration increments it once. Format: int64. |
schema_hash | string | Yes | SHA-256 of the canonical committed schema JSON. |
schema_version_at | string | When the current schema version committed. Absent at version zero. Format: date-time. | |
location | string | The configured backing-store location, when the server exposes one. |
ExecutionContext
The physical execution identity available at failure.
| Field | Type | Required | Description |
|---|---|---|---|
operator | string | The stable physical operator name used by EXPLAIN. | |
operator_id | string | ||
table | string | ||
index | string | ||
binding | string | ||
crossing | string |
ExecutionFailedProblem
ForeignKeyInfo
One foreign key, in both definitions and introspection. The referenced columns must be the referenced table's full primary key.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
columns | array of string | Yes | The referencing column names on this table. |
ref_table | string | Yes | The referenced table's name. |
ref_columns | array of string | Yes | The referenced table's primary key columns, in order. |
Health
The liveness status of the server.
| Field | Type | Required | Description |
|---|---|---|---|
status | string | Yes | |
mode | string | Yes | The database's catalog management mode: direct (the catalog is mutable over this API) or schema (rad.schema.yaml migrations own the catalog and the imperative catalog operations are rejected). |
IndexInfo
One secondary index, in both definitions and introspection.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
columns | array of string | Yes | The indexed column names, in order. |
unique | boolean |
InternalProblem
A deliberately impoverished internal failure. Wrapped causes,
locations, execution context, catalog identity, keys, and values are
never exposed. incident is an optional opaque log correlation ID.
InvalidDiagnostic
One diagnostic within a multi-error invalid problem.
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | Yes | |
detail | string | Yes | |
location | ProblemLocation |
InvalidProblem
NotFoundProblem
Problem
An RFC 7807 Problem Details object. Every non-2xx response carries one.
code is the stable top-level discriminator; reason is the
fine-grained semantic identity within that class.
Variants: InvalidProblem, ExecutionFailedProblem, NotFoundProblem, ConflictProblem, InternalProblem
ProblemBase
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | A stable class-level URN such as urn:rad:problem:conflict. |
title | string | Yes | A short human-readable summary of the problem class. |
status | integer | Yes | The HTTP status code, repeated in the body for convenience. |
detail | string | A human readable explanation specific to this occurrence. | |
reason | string | Yes | The stable fine-grained identity within the problem class. Reasons accumulate over time; generated clients must preserve unknown strings and fall back to code rather than rejecting a response. |
ProblemLocation
Identifies the request construct associated with the problem. JSON Pointer is machine-navigable; the other fields are semantic labels. Fields are omitted when that provenance is unavailable. Table, index, column, binding, and node names may appear; key bytes and row values never do.
| Field | Type | Required | Description |
|---|---|---|---|
pointer | string | An RFC 6901 JSON Pointer into the submitted document. | |
node | string | The LIR node identifier associated with the problem. | |
binding | string | The binding name associated with the problem. | |
scope | string | The relation scope associated with the problem. | |
role | string | A display-oriented structural role such as predicate or order term 0. |
ProblemStage
The engine stage that rejected or failed the operation.
Program
An arbitrary JSON object containing a PIR execution program. As with
Query, the HTTP contract does not describe the PIR grammar; servers
validate this raw body against the independent PIR JSON Schema, and
each statement's relation against the LIR schema.
ProgramResult
The result of a program: the declared result statement's datum (shaped
exactly as its LIR root materialises, as in QueryResult), plus a
per-statement summary in execution order.
| Field | Type | Required | Description |
|---|---|---|---|
result | value | Yes | |
statements | array of StatementResult | Yes | |
plan | value | Present only when the request set show-plan. Free-form JSON: the query plan for each statement; the physical plan and the planner's access-path decisions, plus a rendered text form. Transport observability metadata, not part of the LIR/PIR IR; its structure is deliberately unspecified here and evolves with the planner. |
QueryResult
The result of a query: one datum, shaped exactly as the root
materialises. A many root is an array of records; first is a
record or null; exactly_one is a record; scalar is a naked
value or null. Nested first fields are objects (or null) and
nested array fields are arrays, recursively.
| Field | Type | Required | Description |
|---|---|---|---|
result | value | Yes |
ResourceContext
The addressed API resource, without storage keys or row values.
| Field | Type | Required | Description |
|---|---|---|---|
kind | string | Yes | |
name | string |
SchemaChange
| Field | Type | Required | Description |
|---|---|---|---|
kind | string | Yes | |
summary | string | Yes | |
table | string | ||
column | string |
SchemaCompatibilityRequest
| Field | Type | Required | Description |
|---|---|---|---|
schema_version | integer | Yes | Format: int64. |
schema_hash | string | Yes |
SchemaDiffResult
An advisory point-in-time comparison with the desired schema. program
is the work a newly accepted apply would currently need; it may omit a
transition start when matching durable work is already in progress.
Apply replans transactionally and returns its authoritative transition
identities.
| Field | Type | Required | Description |
|---|---|---|---|
current_version | integer | Yes | Format: int64. |
current_hash | string | Yes | |
desired_hash | string | Yes | |
changes | array of SchemaChange | Yes | |
program | Value | Yes | |
destructive | array of SchemaFinding | Yes | |
blocking | array of SchemaFinding | Yes |
SchemaDocument
The accepted canonical logical schema.
| Field | Type | Required | Description |
|---|---|---|---|
tables | array of TableDef | Yes |
SchemaFinding
| Field | Type | Required | Description |
|---|---|---|---|
kind | string | Yes | |
summary | string | Yes | |
table | string | ||
column | string | ||
rows | integer | Format: int64. |
SchemaMigrateRequest
A desired schema, the preflighted server identity, and explicit data-loss consent.
| Field | Type | Required | Description |
|---|---|---|---|
schema | string | Yes | |
current_version | integer | Yes | Format: int64. |
current_hash | string | Yes | |
accept_data_loss | boolean |
SchemaMigrateResult
SchemaRequest
A desired schema source to plan.
| Field | Type | Required | Description |
|---|---|---|---|
schema | string | Yes | The full rad.schema.yaml source document, as YAML. |
SchemaState
| Field | Type | Required | Description |
|---|---|---|---|
schema_version | integer | Yes | Format: int64. |
schema_hash | string | Yes | |
schema | SchemaDocument | Yes |
StatementResult
One statement's lightweight outcome. Durable schema work additionally returns a typed control object; relational and immediate catalog statements omit it.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
affected | integer | Yes | For relational statements, the number of rows produced, created, updated, or deleted. A successful immediate catalog or transition start reports one affected object. |
control | value | Yes | A typed non-relational result. Transition-start controls contain kind: transition, durable identities, lifecycle state and generation, retained-work health, advisory progress/lag, and terminal diagnostics. Worker ownership epochs and physical storage positions are internal and are not exposed. Statements without a control result emit JSON null. This namespace is not a LIR relation and cannot be referenced by a PIR ref. |
TableDef
A new table's definition, mirroring a rad.schema.yaml entry as JSON. The
direct API may omit logical IDs for the catalog to allocate. Column
types are text, int64, float64, or bool; the primary key is
required and its columns must not be nullable.
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | An optional stable logical identity; direct mode allocates one when omitted. Format: int64. | |
name | string | Yes | |
columns | array of ColumnDef | Yes | |
primary_key | array of string | Yes | |
indexes | array of IndexInfo | ||
foreign_keys | array of ForeignKeyInfo |
TableInfo
One table's definition, as reported by introspection.
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The stable logical table identity within this database. Format: int64. |
name | string | Yes | |
columns | array of ColumnInfo | Yes | |
primary_key | array of string | Yes | The column names that make up the primary key, in order. |
indexes | array of IndexInfo | ||
foreign_keys | array of ForeignKeyInfo |
TableList
The set of tables defined in the database.
| Field | Type | Required | Description |
|---|---|---|---|
tables | array of TableInfo | Yes |
TableUpdateProps
The table properties to update.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The table's new name. |
TransitionControl
The administrative projection of a durable schema transition. Identity, protocol kind, lifecycle state, generation, prerequisite edges, and terminal diagnostics are normative. Progress and retained-work values are advisory snapshots. Worker epochs and physical storage positions remain internal.
| Field | Type | Required | Description |
|---|---|---|---|
kind | transition | Yes | |
transition_id | string | Yes | |
object_id | string | Yes | Stable logical identity of the index, column, or constraint being produced. |
transition_kind | TransitionKind | Yes | |
state | TransitionState | Yes | |
generation | integer | Yes | Format: int64. |
prerequisites | array of string | Yes | Durable transition identities that must publish ready before this transition can activate. |
retained_work_state | TransitionWorkState | Yes | |
last_error | string | Terminal or most recent worker diagnostic, when present. | |
rows_scanned | integer | Yes | Format: int64. |
applied_delta | integer | Yes | Format: int64. |
delta_lag | integer | Yes | Format: int64. |
TransitionKind
The physical protocol used to perform online schema work.
TransitionList
A coherent administrative snapshot of durable schema transitions.
| Field | Type | Required | Description |
|---|---|---|---|
transitions | array of TransitionControl | Yes |
TransitionState
The durable lifecycle state of online schema work.
TransitionWorkState
Advisory retained-work pressure. write_gated means affected writes
are temporarily rejected until the worker catches up or terminates.
Value
An arbitrary JSON value carried by the HTTP protocol.