Hanzo
OpenapiKv

Creates a KV bucket and returns it.

Creates a KV bucket and returns it. A bucket is keyed state on the same durable plane as the streams: each key holds up to History revisions, entries can…

POST /v1/kv/{bucket}

Addresshttps://api.hanzo.ai/v1/kv/{bucket}
MethodPOST
Operationpost_kv_by_bucket
AuthAuthorization: Bearer $HANZO_API_KEY

Creates a KV bucket and returns it. A bucket is keyed state on the same durable plane as the streams: each key holds up to History revisions, entries can expire by TTL, and watchers on the NATS port see every write. 409 when the org already has a bucket of that name.

Request

5 fields, body application/json (required).

FieldInTypeRequiredDescription
bucketpathstringyesBucket is the bucket's name within the org, from the path: 1–64 of [A-Za-z0-9_], no dash.
bucketbodystringBucket is the bucket's name within the org, from the path: 1–64 of [A-Za-z0-9_], no dash.
historybodyintegerHistory is how many revisions each key keeps, 1–64.
maxValuebodyintegerMaxValue caps one value's size in bytes.
ttlbodyintegerTTL expires entries after this many SECONDS.

Response

StatusBodyMeaning
201bucketRecordcreated

201 body — 4 fields.

FieldInTypeAlwaysDescription
bucketbodystringBucket is the bucket's name within the org.
historybodyintegerHistory is how many revisions each key keeps.
ttlbodyintegerTTL is the entry expiry in seconds; 0 means none.
valuesbodyintegerValues is how many values the bucket holds right now.

Failure carries the platform error shape — see Errors.

Examples

hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.


KV API · All Hanzo APIs · Interactive reference

How is this guide?

On this page