Skip to main content

Request and response types

The operations the server exposes, and where each runs. The exact field shapes are in the .NET and Rust client types; this is the map.

OperationRequestResponseRuns onNotes
WriteWriteRequest (map of AggregateKey to SingleAggregateWrite)SuccessResponseleaderConditional and atomic across aggregates on one shard.
ReadReadRequest (AggregateKey + ReadFilters)ReadResponse (event batches + NextAggregateVersion cursor)any nodePer-aggregate, ordered, filtered, paged.
Aggregate detailsAggregateDetailsRequestAggregateDetailsResponse (versions, IsDeleted, flags, last write)any nodeMetadata without the events.
DeleteDeleteRequest (map to SingleAggregateDelete)SuccessResponseleaderRemoves a stream; AllowRecreate / AllowSequenceContinuation flags.
TrimTrimStartRequest (KeepFromAggregateVersion)SuccessResponseleaderDrops a prefix of old events.
Register schemaRegisterSchemaRequest (SchemaKey + SchemaType + schema)SuccessResponseleaderValidates future writes of that event type.
WatchWatchRequest (scope + RequestedLatency)a stream of WatchResponse (change notifications)any nodeNotifications carry the changed batch-index range, not payloads.
List orgs / types / aggregateslist request (scope + paging)a stream of list items / AggregateStatsany nodeStreaming; the client merges across shards.

Shared shape

Every request carries an optional CorrelationId (a u128) echoed back on the response, for tracing. Write, delete, trim, and register-schema also carry a ClientId (the writer's identity for idempotency) and an optional UserId.

Leader vs any node

Writes and other mutations run on the leader; the client pools follow a NotLeader redirect automatically. Reads, details, watch, and list run on any node, and can be routed to a follower (accepting its small replication lag) when the pool has RouteReadsToFollowers set. A follower read must not drive an optimistic-concurrency write; take that version from the leader.

Errors

Any operation can return an ErrorResponse with a numeric ErrorCode; the clients turn known codes into typed errors. See the error codes reference.