seq_num
timestamp
tail_offset
(the number of records before the tail)
append
has received an acknowledgment before the read
request is made, the response will reflect the write.count
or bytes
size, or until
a specific timestamp.
?wait=<seconds>
. A response will only be sent when records are available or the wait elapses.
With a ReadSession
(available via most SDKs) or using SSE, you are able to read in a streaming fashion. Once the tail of the stream is reached, a session will follow in real-time for new records if either no bounds are provided (count
, bytes
, until
), or wait
is non-zero.
SSE
Server push with Server-Sent-Events (SSE) is supported. Clients can request an SSE response by setting theAccept: text/event-stream
header.
Error
message will terminate the stream.Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your access token.
Headers
Defines the interpretation of record data (header name, header value, and body) with the JSON content type.
Use raw
(default) for efficient transmission and storage of Unicode data — storage will be in UTF-8.
Use base64
for safe transmission with efficient storage of binary data.
raw
, base64
Path Parameters
Stream name.
Query Parameters
Start from a sequence number.
x >= 0
Start from a timestamp.
x >= 0
Start from number of records before the next sequence number.
x >= 0
Start reading from the tail if the requested position is beyond it.
Otherwise, a 416 Range Not Satisfiable
response is returned.
Record count limit. Non-streaming reads are capped by the default limit of 1000 records.
x >= 0
Metered bytes limit. Non-streaming reads are capped by the default limit of 1 MiB.
x >= 0
Exclusive timestamp to read until.
x >= 0
Duration in seconds to wait for new records.
The default duration is 0 if there is a bound on count
, bytes
, or until
, and otherwise infinite.
Non-streaming reads are always bounded on count
and bytes
, so you can achieve long poll semantics by specifying a non-zero duration up to 60 seconds.
In the context of an SSE or S2S streaming read, the duration will bound how much time can elapse between records throughout the lifetime of the session.
x >= 0
Response
Records that are durably sequenced on the stream, retrieved based on the requested criteria. This can only be empty in response to a regular (non-SSE) read, if the request cannot be satisfied without violating an explicit limit.
Sequence number that will be assigned to the next record on the stream, and timestamp of the last record. This will only be present when reading recent records.