curl -X POST https://stream.tonbo.dev/ds/demo/hello \
-H 'Content-Type: application/octet-stream' \
--data-binary 'hello world'
curl -X POST https://stream.tonbo.dev/ds/demo/hello \
-H 'Content-Type: application/json' \
--data-binary '{"event": "click", "ts": 1711234567}'
curl -X POST https://stream.tonbo.dev/ds/demo/hello \
-H 'Stream-Closed: true'
Streams
Append
Append data to an existing stream, or close it.
POST
/
ds
/
{bucket}
/
{stream}
curl -X POST https://stream.tonbo.dev/ds/demo/hello \
-H 'Content-Type: application/octet-stream' \
--data-binary 'hello world'
curl -X POST https://stream.tonbo.dev/ds/demo/hello \
-H 'Content-Type: application/json' \
--data-binary '{"event": "click", "ts": 1711234567}'
curl -X POST https://stream.tonbo.dev/ds/demo/hello \
-H 'Stream-Closed: true'
string
required
Bucket ID.
string
required
Stream ID within the bucket.
string
required
Must match the stream’s content type. Required when the body is non-empty.
string
Set to
true to close the stream after this append.string
Conditional write: only succeed if the stream’s ETag matches.
string
Client-supplied sequence token for conflict detection.
string
Producer identity for exactly-once writes.
string
Producer epoch.
string
Producer sequence number.
binary
required
The bytes to append. Must not be empty unless
Stream-Closed: true is set (close-only request).Response
| Status | Meaning |
|---|---|
200 | Append successful. |
400 | Empty body without Stream-Closed: true, missing content type, or bad JSON. |
404 | Stream not found. |
409 | Stream is already closed, or sequence/producer conflict. |
412 | If-Match precondition failed. |
503 | Write backpressure. Retry after the duration in Retry-After. |
Stream-Next-Offset and ETag.
curl -X POST https://stream.tonbo.dev/ds/demo/hello \
-H 'Content-Type: application/octet-stream' \
--data-binary 'hello world'
curl -X POST https://stream.tonbo.dev/ds/demo/hello \
-H 'Content-Type: application/json' \
--data-binary '{"event": "click", "ts": 1711234567}'
curl -X POST https://stream.tonbo.dev/ds/demo/hello \
-H 'Stream-Closed: true'
Appends to JSON streams are validated and normalized. The server may coalesce multiple concurrent appends into a single batch for performance.

