REST API
The REST API is a JSON projection of the gRPC API. Everything you can do over gRPC you can do over REST, with slightly more wire overhead.
Base URL
Section titled “Base URL”- Sandbox:
https://sandbox.evidentsource.com - Your deployment: whatever’s behind your ALB
Routes
Section titled “Routes”Commands
Section titled “Commands”POST /v1/commands{ "database": "<name>", "command": { "type": "...", "subject": "...", "data": { ... } }}Events
Section titled “Events”GET /v1/events?database=<name>&stream=<s>&subject=<s>&type=<t>&asOfTransactionTime=<ts>&asOfEffectiveTime=<ts>State views
Section titled “State views”GET /v1/state-views/<view-name>?database=<name>&<param>=<value>&asOfTransactionTime=<ts>&asOfEffectiveTime=<ts>Administration
Section titled “Administration”GET /v1/databasesPOST /v1/databasesDELETE /v1/databases/<name>GET /v1/databases/<name>/componentsPOST /v1/databases/<name>/componentsConstraints
Section titled “Constraints”When appending events directly (not via a command), you can pass DCB conditions in the request body. See Dynamic Consistency Boundaries and the proto definitions for the full predicate vocabulary.
Authentication
Section titled “Authentication”Authorization: Bearer <token> — same as gRPC. See Security.
Content types
Section titled “Content types”Requests and responses are application/json. Streaming subscriptions are delivered as text/event-stream (SSE).