fauna · AsyncAPI Specification
Fauna Event Streaming
Version 1
The Fauna Event Streaming API enables real-time change data capture by maintaining an open connection to the Fauna database and pushing events to clients as they occur. Developers can subscribe to document or set changes and receive add, remove, and update events in real time. The API supports reconnection with a start timestamp or cursor to avoid missing events during disconnections. It is accessible via the /stream/1 HTTP endpoint with token-based authentication.
Channels
/stream/1
Receive real-time change events
Event stream channel for real-time change data capture. Clients send a POST request with an event source token to open a persistent connection. Fauna pushes events through the open connection as changes occur in the subscribed document or set. The connection remains open until closed by the client or server. If a tracked change occurs, the event source emits a related add, remove, or update event.
Messages
StreamSubscription
Stream Subscription Request
Request to open an event stream connection.
StatusEvent
Status Event
Heartbeat or connection status event sent when the stream is opened or periodically to keep the connection alive.
AddEvent
Add Event
Event emitted when a new document is added to the tracked set or a document begins matching the tracked criteria.
RemoveEvent
Remove Event
Event emitted when a document is removed from the tracked set or a document stops matching the tracked criteria.
UpdateEvent
Update Event
Event emitted when a tracked document is updated.
Servers
https
production
https://db.fauna.com
Fauna Global Production Server. The /stream/1 endpoint maintains a persistent HTTP connection that pushes events as server-sent data.