Brain Docs

Reference

TypeScript SDKInstallationHTTP clientWire client
getSchemavalidateSchemauploadSchemareplaceSchemadropSchemalistSchemaslistExtractors
ErrorsRetriesPagination
Brain/Docs
✦ ASKBrain on GitHubDashboard
TypeScript SDKSchemalistSchemas

listSchemas

Every schema version in the namespace, and whether each one kept its source text.

PURPOSE

Every schema version in the namespace, newest first, cursor-paged.

GET/v1/schemasBearer API keystable
listSchemas(query?: ListSchemasQuery): Promise<ListSchemasResult>
Handshake credentialstable
listSchemas(request: SchemaListRequest): Promise<SchemaListItemWire[]>
listSchemasFrames(request: SchemaListRequest): Promise<SchemaListResponseFrame[]>

Parameters

ParameterTypeRequired
limitintegeroptional

Page size.

cursorstring (wire: bytes)optional

Cursor from the previous page.

Returns

FieldTypePresence
namespacestringalways

The namespace.

itemsSchemaVersion[]always

Each with schemaVersion, uploadedAtUnixNanos, validatorVersion and hasSourceText.

totalintegeralways

How many versions exist in total.

nextCursorstring

Absent on the last page.

hasSourceText can be false

false means the document itself was not retained for that version, only the compiled form. getSchema on such a version cannot give you the text back — so keep your schemas in version control, not only in Brain.

See also
getSchemaPagination

Was this page helpful?

dropSchema

Remove one declaration — and find out how many live rows still depend on it.

listExtractors

The extractors bound to the active schema, and the extractor ids you attribute claims to.

On this page

ParametersReturns
Suggest an editOpen in Playground