Docs menu · Reference

Reads events from the selected branch and space by sequence range. The start sequence is inclusive and the optional end sequence is exclusive; reverse direction walks backward from the start sequence. An optional event type narrows the results.

Paginated responses use opaque cursors. Clients should pass the returned cursor back to the same command shape and must not parse cursor contents.

Examples

Read a range of events by sequence.

CLI

$ strata event append user.created {"id":1}
$ strata event append user.updated {"id":2}
$ strata event range 0 forward

Wire

{"event_type":"user.created","payload":{"id":1},"type":"event_append"}
{"event_type":"user.updated","payload":{"id":2},"type":"event_append"}
{"direction":"forward","start_seq":0,"type":"event_range"}

Parameters

NameTypeRequiredDescription
directionEventRangeDirectionyesResult ordering.
end_seqintegernoOptional exclusive end sequence; with reverse direction, exclusive lower bound.
event_typestringnoOptional event type filter.
limitintegernoOptional item limit.
start_seqintegeryesInclusive start sequence; with reverse direction, walk backward from this sequence.

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

Returns

Page<EventVersionedData, u64>.

Errors

Invocation

  • CLI: strata event range
  • Wire type: event_range

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