Docs menu · Reference

Reads one event from the selected branch and space by sequence number. The optional timestamp reads the record visible at that commit time. The record carries its payload, append timestamp, and hash-chain facts.

Optional reads distinguish present data from missing data. When version or timestamp facts exist on the executor output, SDK mappings should preserve them.

Examples

Read an event by its sequence number.

CLI

$ strata event append user.created {"id":1}
$ strata event get 0
$ strata event get 999

Wire

{"event_type":"user.created","payload":{"id":1},"type":"event_append"}
{"sequence":0,"type":"event_get"}
{"sequence":999,"type":"event_get"}

Parameters

NameTypeRequiredDescription
as_ofintegernoOptional timestamp in microseconds.
sequenceintegeryesEvent sequence.

Plus the optional scope: branch and space (default to the session branch and the "default" space).

Returns

Maybe<EventVersionedData> — a miss returns nothing rather than raising.

Errors

Invocation

  • CLI: strata event get
  • Wire type: event_get

agents: this page as markdown → /docs/reference/event/get.md