Skip to content

Reading state views

State Views are the queryable projections your application reads. In the Sandbox, the TodoMVC example ships with views like todo-list and single-todo; components you deploy via Designer register their own views.

Each state view has:

  • A name (e.g. todo-list)
  • A parameter set (what identifies a specific instance — e.g. { todoId: string })
  • A serialized state body (the shape returned by evolve)
  • A revision (the event-log revision it reflects)
Terminal window
# Read the whole todo-list view
curl "https://sandbox.evidentsource.com/v1/state-views/todo-list?database=todomvc"
# Read a specific single-todo
curl "https://sandbox.evidentsource.com/v1/state-views/single-todo?database=todomvc&todoId=todo-123"

Every read supports as_of_transaction_time and as_of_effective_time parameters — see Bi-Temporal Indexing.

Terminal window
curl "https://sandbox.evidentsource.com/v1/state-views/todo-list?database=todomvc&asOfTransactionTime=2026-04-20T00:00:00Z"

Use the ReadStateView RPC on the StateView service — see gRPC API. Every SDK exposes a typed readStateView method — see Connecting with an SDK.

State views are also subscribable as streams — you get a snapshot plus a live tail. This is how responsive UIs stay in sync without polling. See gRPC API for the subscription RPC.