GET
/
streams
/
{stream}
/
records
curl --request GET \
  --url https://{basin}.b.aws.s2.dev/v1alpha/streams/{stream}/records \
  --header 'Authorization: Bearer <token>'
{
  "batch": {
    "records": [
      {
        "body": "<string>",
        "headers": [
          {
            "name": "<string>",
            "value": "<string>"
          }
        ],
        "seq_num": 1,
        "timestamp": 1
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

s2-format
enum<string>
default:json

json: utf-8 plaintext data. json-binsafe: base64 encoded binary data.

Available options:
json,
json-binsafe

Path Parameters

stream
string
required

Name of the stream.

Query Parameters

start_seq_num
integer

Starting sequence number (inclusive).

Required range: x >= 0
limit
object

Limit how many records can be returned. This will get capped at the default limit, which is up to 1000 records or 1MiB of metered bytes.

Response

200
application/json

Batch of records, or a sequence number if the read could not be satisfied. An empty batch or a sequence number output will be a terminal message in a session.

batch
object
required

Batch of records. It can only be empty when not in a session context (which implies a limit), if the first record that could have been retrieved would violate the limit.