Publish snapshot

Upload a snapshot blob at a specific stream offset.

Publishes a new snapshot blob at the given offset. The snapshot replaces any previously published snapshot and enables cold storage cleanup of data before this offset.

bucketpathstringrequired

Bucket ID.

streampathstringrequired

Stream ID.

offsetpathstringrequired

Stream offset this snapshot represents: the 20-character zero-padded decimal token.

Content-Typeheaderstring

Content type of the snapshot blob, stored separately from the stream's own content type. Defaults to application/octet-stream.

bodybodybinaryrequired

The snapshot blob bytes. Maximum size is 128 MiB; larger bodies return 413.

Response

StatusMeaning
204Snapshot published successfully.
400Invalid offset or content type.
404Stream not found or expired.
409Stale publish (a newer snapshot exists) or offset out of range.
410Snapshot offset is too old (data already garbage-collected).
413Snapshot body exceeds the maximum allowed size.

Response headers include Stream-Next-Offset and Stream-Snapshot-Offset.

curl -X PUT 'http://127.0.0.1:4437/demo/hello/snapshot/00000000000000000042' \
  -H 'Content-Type: application/json' \
  --data-binary '{"state": "aggregated snapshot data"}'

Delete snapshot

DELETE /{bucket}/{stream}/snapshot/{offset}

Attempting to delete the current visible snapshot is not allowed.

StatusMeaning
404No snapshot at the given offset.
409Cannot delete the current snapshot.

Snapshots are immutable once published. Each publish creates a new blob with a unique key, so retries cannot overwrite a committed snapshot. After a snapshot is committed, cold storage chunks before the snapshot offset are automatically cleaned up.