Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Fauna Event Streaming API

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 to avoid missing events during disconnections. It is accessible via the /stream/1 HTTP endpoint with token-based authentication.

Fauna Event Streaming API is one of 9 APIs that fauna publishes on the APIs.io network, described by an AsyncAPI event-driven specification.

Tagged areas include Change Data Capture, Database, Events, Real-Time, and Streaming. The published artifact set on APIs.io includes API documentation and an AsyncAPI specification.

This event API exposes 2 operations across 1 channel, and defines 11 schemas. It is described by AsyncAPI 2.6.0, at version 1.

The API connects through a single server, https://db.fauna.com (https).

2 operations 1 channels 11 schemas

Metadata

The identity and technical contract details declared by the specification.

Specification
AsyncAPI 2.6.0
API Version
1
Base URL
https://db.fauna.com
Resource Areas
1

Channels & Operations 2

Across 1 channel, the API surfaces 2 operations. Each is listed below with its action, channel, parameters, and response codes.

Channels 2
SUB
/stream/1
Subscribe to an event stream
subscribeToStream body
PUB
/stream/1
Receive real-time change events
receiveStreamEvents body

Messages & Schemas 11

The contract defines 11 schemas that model the data carried by its messages. The most detailed are UpdateEventPayload (5 properties), RemoveEventPayload (5 properties), AddEventPayload (5 properties), StreamStats (4 properties). Each schema is shown below with its type and property counts.

StreamSubscription
message
Request to open an event stream connection.
StatusEvent
message
Heartbeat or connection status event sent when the stream is opened or periodically to keep the connection alive.
AddEvent
message
Event emitted when a new document is added to the tracked set or a document begins matching the tracked criteria.
RemoveEvent
message
Event emitted when a document is removed from the tracked set or a document stops matching the tracked criteria.
UpdateEvent
message
Event emitted when a tracked document is updated.
StreamSubscriptionPayload
object
3 properties 1 required
StatusEventPayload
object
4 properties
AddEventPayload
object
5 properties
RemoveEventPayload
object
5 properties
UpdateEventPayload
object
5 properties
StreamStats
object
Operational statistics for the event.
4 properties

Specification

The full machine-readable AsyncAPI contract behind this narrative.

Source

fauna-event-streaming-asyncapi.yml Raw ↑

Other APIs fauna publishes across the network.

Fauna Event Feeds API
Fauna GraphQL API
Fauna JavaScript Driver
Fauna Python Driver
Fauna .NET Driver
fauna EventFeeds API
fauna Query API
fauna Schema API