Brain Docs

Reference

TypeScript SDKInstallationHTTP clientWire client
createStatementgetStatementlistStatementssupersedeStatementtombstoneStatementretractStatementstatementHistory
ErrorsRetriesPagination
Brain/Docs
✦ ASKBrain on GitHubDashboard
TypeScript SDKStatementsgetStatement

getStatement

Read one statement — and the supersession-following default that can hand you a different one.

PURPOSE

Read one statement, optionally following its supersession chain to the current version.

GET/v1/statements/:idBearer API keystable
getStatement(statementId: string, query?: GetStatementQuery): Promise<StatementDetail>
Handshake credentialstable
getStatement(request: StatementGetRequest): Promise<StatementGetResponse>

Parameters

ParameterTypeRequired
statementIdstringrequired

The statement to read.

followSupersessionbooleanoptional

Follow the chain to its head. Defaults to true, so asking for one id can hand you a different statement.

Returns

FieldTypePresence
statementId / kind / subject / predicate / object—always

The claim itself.

confidencefloatalways

Confidence in [0, 1].

eventAtUnixNanos64-bit integeralways

When the thing happened.

validFromUnixNanos / validToUnixNanos64-bit integeralways

The interval the claim is asserted over — bitemporal, and separate from event time.

version / supersedes / supersededBy / chainRoot—always

Position in the chain. chainRoot is stable across every version, so it is the id to store when you mean the fact itself rather than one version of it.

tombstoned / tombstonedAtUnixNanos / tombstoneReason—always

Retirement state.

extractorId / extractedAtUnixNanos / schemaVersion—always

Provenance.

subjectName / objectNamestring

Resolved display names, when available.

Check the id you got back

Because supersession is followed by default, the statementId on the result may not be the one you asked for. Read it rather than assuming it echoes your argument — otherwise a caller that stores "the id it just read" ends up pointing at a version it never requested.

On the wire

subject is UUID bytes and kind is an integer discriminant rather than a string. evidence is a single reference, not an array of ids. Every request carries a requestId plus an optional actAs.

See also
statementHistorySupersession

Was this page helpful?

createStatement

Write a typed claim — subject, predicate, object — and learn what it automatically superseded.

listStatements

Query statements by subject, predicate, kind and confidence — cursor-paged.

On this page

ParametersReturnsOn the wire
Suggest an editOpen in Playground