GET

Subscribe to a stream.

Request

Content-Type: application/json

Schema

Field name Type Required Description

token

Yes

Stream token for the stream to subscribe to.

start_ts

Int

Stream start time in microseconds since the Unix epoch.

start_ts must be later than the creation time of the stream token.

The period between the stream restart and the start_ts can not exceed the history_days value for source Set’s collection. If a collection’s history_days is 0 or unset, the period can’t exceed 15 minutes.

Examples

[expand]

Request:

{
  "token": "g9WD1YPG...",
  "start_ts": 1710968002310000
}'

 

Response

Content-Type: application/json

A successful request starts a stream. When the stream starts, Fauna responds with a status event.

{
  "type": "status",
  "txn_ts": 1710968002310000,
  "stats": {
    "read_ops": 8,
    "storage_bytes_read": 208,
    "compute_ops": 1,
    "processing_time_ms": 0,
    "rate_limits_hit": []
  }
}

The connection remains open so Fauna can notify the client of new events. See Event Streaming reference.

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!