Read records.
Retrieve a batch of records, or continuously stream.
Reads may start at one of:
seq_num
timestamp
tail_offset
(the number of records before the tail)
The first record that is returned will be the earliest on the stream that is greater than or equal to the requested starting point.
You may limit the read by total count
or bytes
size, or until
a specific timestamp.
With a ReadSession
(available via most SDKs) or using SSE, you are able to read in a streaming fashion. If a limit is not specified and the end of the stream is reached, the session goes into real-time tailing mode and will return records as they are appended to the stream.
Reading records written within the last 20 seconds is expected to take single-digit milliseconds. Otherwise, the time-to-first-byte can take up to 200 milliseconds.
SSE
Server push with Server-Sent-Events (SSE) is supported. Clients can request an SSE response by setting the Accept: text/event-stream
header.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
Defines the treatment of blob fields when exchanging records as JSON.
Use raw
(default) if you are working with Unicode data — storage will be in UTF-8.
Use base64
for safe transmission and 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
Limit total records to return. If this is provided, tailing will be disabled.
x >= 0
Limit total metered bytes to return. If this is provided, tailing will be disabled.
x >= 0
Exclusive timestamp to read until. If this is provided, tailing will be disabled.
x >= 0
Response
The response is of type object
.