GET /streams//records
Read records from a stream with flexible positioning and filtering options. This endpoint supports both unary (request-response) and streaming modes.Authentication
Requires a valid access token with read permissions to the stream.Path Parameters
Stream name to read records from.
Headers
Basin name where the stream resides.
Encoding format for record headers and body in the response:
base64- Base64-encoded binary data (default)utf8- UTF-8 text
Response format:
application/json- JSON response (unary read)application/protobuf- Protobuf response (unary read)text/event-stream- Server-Sent Events streamings2s/proto- S2S streaming protocol
For SSE reconnection. Format:
{seq_num}:{count}:{bytes}Automatically resume from the last received record.Query Parameters - Start Position
Specify exactly one of these to set the starting position:Start reading from this sequence number (inclusive).
Start reading from this timestamp in milliseconds since Unix epoch (inclusive).
Start reading from N records before the current tail. Default is 0 (start from tail).
If true and the requested position is beyond the tail, start from the tail instead of returning
416 Range Not Satisfiable.Query Parameters - End Conditions
Maximum number of records to return.Unary reads are capped at 1000 records (default). Streaming reads have no default limit.
Maximum metered bytes to return.Unary reads are capped at 1 MiB (default). Streaming reads have no default limit.
Exclusive timestamp to read until. Stop when encountering a record with timestamp >= this value.
Duration in seconds to wait for new records.
- For unary reads: Maximum 60 seconds. Default is 0 if count/bytes/until are specified.
- For streaming reads: Idle timeout between records. Default is infinite.
Response
Array of sequenced records retrieved from the stream.For unary reads, can be empty if the request cannot be satisfied without violating explicit bounds.
Present when reading recent records near the tail.
Status Codes
200 OK- Records successfully retrieved400 Bad Request- Invalid query parameters403 Forbidden- Insufficient permissions404 Not Found- Stream does not exist416 Range Not Satisfiable- Requested position is beyond the tail (returns tail position in response)408 Request Timeout- Operation timed out409 Conflict- Stream is being deleted
Examples
Read from the beginning
Response
Read from tail
Read last 100 records
Read from timestamp
Read with time range
Long polling (wait for new records)
Clamped read
Handle range not satisfiable
Unary vs Streaming
Unary Read
Default mode when Accept header isapplication/json or application/protobuf:
- Returns a single batch of records
- Limited to 1000 records and 1 MiB
- Suitable for pagination and bounded queries
- Supports long polling with
waitparameter
Streaming Read
Use Accept headertext/event-stream or s2s/proto:
- Continuously streams records as they arrive
- No default limits on count or bytes
- Ideal for tailing streams and real-time processing
- See Read Session for details
Notes
- If no start position is specified, defaults to
tail_offset=0(start from tail) - Records are always returned in sequence number order
- The
tailfield is only included when reading near the current tail - Empty result with
tailindicates you’ve caught up to the stream - Metered bytes count towards billing and include record headers and bodies