Dynamic Consistency Boundary (DCB)
DCB APIs, types, and error responses
This is the reference for DCB in DeltaBase. No fluff, just facts.
Endpoints
Section titled “Endpoints”POST /event-stores/{eventStoreName}/events
Section titled “POST /event-stores/{eventStoreName}/events”Streamless append with an optional append condition.
Request:
{ "events": [ { "type": "UserRegistered", "data": { "userId": "u1", "username": "alice" }, "tags": ["username:alice"] } ], "condition": { "failIfEventsMatch": { "items": [ { "types": ["UserRegistered"], "tags": ["username:alice"] } ] }, "after": 123 }}Response:
{ "lastPosition": 456}POST /event-stores/{eventStoreName}/query
Section titled “POST /event-stores/{eventStoreName}/query”Read events by query (types and/or tags).
Request:
{ "query": { "items": [ { "types": ["UserRegistered"], "tags": ["username:alice"] } ] }, "after": 0, "limit": 1000}Response:
{ "events": [ { "eventId": "...", "type": "UserRegistered", "data": { "userId": "u1", "username": "alice" }, "tags": ["username:alice"], "streamId": "__dcb__", "streamPosition": 1, "globalPosition": 456, "schemaVersion": "0.0.1", "transactionId": "0", "createdAt": "2026-02-04T20:00:00Z" } ], "lastPosition": 456}streamId is included for compatibility. For DCB events it is a
reserved internal value. Treat it as an implementation detail.
Opaque string. Commas are forbidden.
{ "items": [ { "types": ["A"], "tags": ["t1", "t2"] } ] }- Types are OR within a query item
- Tags are AND within a query item
- Query items are OR across the query
AppendCondition
Section titled “AppendCondition”{ "failIfEventsMatch": { "items": [ ... ] }, "after": 123}Errors
Section titled “Errors”AppendConditionError (409)
Section titled “AppendConditionError (409)”{ "error": "Append condition failed", "details": "...", "conflictingPositions": [456], "afterPosition": 123}Constraints
Section titled “Constraints”- Tags must not contain commas.
- The reserved stream id
__dcb__is not allowed in stream endpoints.