getStatement
Read one statement — and the supersession-following default that can hand you a different one.
getStatement(statementId: string, query?: GetStatementQuery): Promise<StatementDetail>getStatement(request: StatementGetRequest): Promise<StatementGetResponse>Parameters
statementIdstringrequiredThe statement to read.
followSupersessionbooleanoptionalFollow the chain to its head. Defaults to true, so asking for one id can hand you a different statement.
Returns
statementId / kind / subject / predicate / object—alwaysThe claim itself.
confidencefloatalwaysConfidence in [0, 1].
eventAtUnixNanos64-bit integeralwaysWhen the thing happened.
validFromUnixNanos / validToUnixNanos64-bit integeralwaysThe interval the claim is asserted over — bitemporal, and separate from event time.
version / supersedes / supersededBy / chainRoot—alwaysPosition 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—alwaysRetirement state.
extractorId / extractedAtUnixNanos / schemaVersion—alwaysProvenance.
subjectName / objectNamestringResolved display names, when available.
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.
Was this page helpful?