Brain Docs

Reference

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

listStatements

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

PURPOSE

A cursor-paged listing of statements, filtered by the claim's own fields.

GET/v1/statementsBearer API keystable
listStatements(query?: ListStatementsQuery): Promise<ListStatementsResult>
Handshake credentialstable
listStatements(request: StatementListRequest): Promise<StatementView[]>
listStatementsFrames(request: StatementListRequest): Promise<StatementListResponseFrame[]>

Parameters

ParameterTypeRequired
subjectstringoptional

Entity id.

predicatestringoptional

Predicate name, as the schema declares it.

kindFact | Preference | Eventoptional

Statement kind.

minConfidencefloatoptional

Floor on confidence.

onlyCurrentbooleanoptional

Only the head of each supersession chain. Without it you get every version — which is what you want for an audit and not for a read.

includeTombstonedbooleanoptional

Defaults to false.

limitintegeroptional

Page size.

cursorstring (wire: bytes)optional

Cursor from the previous page.

Returns

FieldTypePresence
statementsStatementDetail[]always

The page.

countintegeralways

How many are in this page.

nextCursorstring

Absent on the last page.

The wire request adds timeRangeStartUnixNanos and timeRangeEndUnixNanos, which the HTTP tier does not expose.

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
getStatementPagination

Was this page helpful?

getStatement

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

supersedeStatement

Correct a claim by writing its replacement — the old version stays readable and the chain records the order.

On this page

ParametersReturnsOn the wire
Suggest an editOpen in Playground