POST
/
streams
/
{stream}
/
records
curl --request POST \
  --url https://{basin}.b.aws.s2.dev/v1alpha/streams/{stream}/records \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "fencing_token": "<string>",
  "match_seq_num": 1,
  "records": [
    {
      "body": "<string>",
      "headers": [
        [
          "<any>"
        ]
      ]
    }
  ]
}'
{
  "end_seq_num": 1,
  "next_seq_num": 1,
  "start_seq_num": 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.

Body

application/json

Input for append requests.

records
object[]
required

Batch of records to append atomically, which must contain at least one record, and no more than 1000. The total size of a batch of records may not exceed 1MiB of metered bytes.

fencing_token
string | null

Enforce a fencing token which must have been previously set by a fence command record.

match_seq_num
integer | null

Enforce that the sequence number issued to the first record matches.

Required range: x > 0

Response

200
application/json

Output from append response.

end_seq_num
integer
required

Sequence number of last record appended + 1. end_seq_num - start_seq_num will be the number of records in the batch.

Required range: x > 0
next_seq_num
integer
required

Sequence number of last durable record on the stream + 1. This can be greater than end_seq_num in case of concurrent appends.

Required range: x > 0
start_seq_num
integer
required

Sequence number of first record appended.

Required range: x > 0