API overview
Learn the public Ursula HTTP routes for creating, appending, reading, and replaying streams.
Ursula exposes a small public HTTP API for durable append-only streams. Most users only need the /{bucket}/{stream} route family, which maps cleanly to buckets and stream IDs.
This API is Ursula's implementation of the Durable Streams Protocol, defined by the durable-streams community, with additional route families for compatibility and deployment needs.
Bucket operations
| Method | Path | Description |
|---|---|---|
PUT | /{bucket} | Create a bucket |
GET | /{bucket} | Get bucket metadata |
DELETE | /{bucket} | Delete a bucket |
GET | /{bucket}/streams | List streams in a bucket |
Stream operations
| Method | Path | Description |
|---|---|---|
PUT | /{bucket}/{stream} | Create a stream |
POST | /{bucket}/{stream} | Append data or close |
GET | /{bucket}/{stream} | Read (catch-up, long-poll, SSE) |
HEAD | /{bucket}/{stream} | Get stream metadata |
DELETE | /{bucket}/{stream} | Delete a stream |
Bootstrap and snapshots
| Method | Path | Description |
|---|---|---|
GET | /{bucket}/{stream}/bootstrap | Snapshot + tail replay |
GET | /{bucket}/{stream}/snapshot | Read latest snapshot |
GET | /{bucket}/{stream}/snapshot/{offset} | Read snapshot at offset |
PUT | /{bucket}/{stream}/snapshot/{offset} | Publish a snapshot |
v1 compatibility
A flat v1 compatibility layer is also available under /v1/stream/{path} for simpler integrations that don't need explicit bucket management.
Common request patterns
Create a bucket and stream
curl -X PUT http://127.0.0.1:4437/demo
curl -X PUT http://127.0.0.1:4437/demo/hello
Append data
curl -X POST http://127.0.0.1:4437/demo/hello \
-H 'Content-Type: application/octet-stream' \
--data-binary 'hello world'
Read from the beginning
curl 'http://127.0.0.1:4437/demo/hello?offset=-1'
Subscribe with SSE
curl 'http://127.0.0.1:4437/demo/hello?offset=-1&live=sse'
Related concepts
- Read modes: catch-up vs long-poll vs SSE
- Bootstrap: snapshot + tail recovery
- Snapshots: snapshot lifecycle
- Exactly-once writes: producer deduplication
- Conditional writes: ETag and sequence-based writes