Metadata and SQL endpoints
View as MarkdownIdentity
Section titled “Identity”Framework routes registered under /api/meta, including the privileged
POST /api/meta/sql escape hatch.
Contract
Section titled “Contract”GET /api/meta/inforeturns project identity.GET /api/meta/tablesreturns{ tables: TableSchema[] }.GET /api/meta/tables/<name>returns oneTableSchema.- A serialized
TableSchemacontainsname,label,immutable,columns,children, optionalrowLinks,rowLabelColumns, optionalrowCount, andsearchable. - Serialized columns contain public SQL names, labels, semantic kinds, structural facts, references, select options, and supported presentation hints. Children contain their table, foreign key, label, columns, default sort, and optional width.
- Every serialized table column has a semantic
kind. Select options come from the column’s Drizzle enum declaration, andapiWritableis included when the table definition declares an API write restriction. - Browser table code parses the metadata response with the shared
TableSchemaZod contract before using it for display, filter, form-draft, or grid-patch behavior. - The response is a presentation/schema projection. It does not contain row
scope, abilities, request authority, validation callbacks, authoring
references, or the recursive search plan.
searchableis only a capability flag. POST /api/meta/sqlreturns rows for read statements. Mutating statements require the route’s privileged authority plusallowDangerous: true.- SQL bypasses table helpers, trusted-value preparation, reference checks, and ordinary row visibility.
- The running OpenAPI document exposes registration, request parameters, limits, dry-run input, and declared responses. It does not prove the application’s authorization requirements.