Docs
  • 0.57.0latest
  • 0.56.0
  • 0.55.0
  • 0.54.0
  • 0.53.0
  • 0.52.1
  • 0.52.0
  • 0.51.0
  • 0.48.0
  • 0.47.0
  • 0.46.0
  • 0.45.0
  • 0.44.0
  • 0.43.0
  • 0.42.0
  • 0.41.0
  • 0.40.0
  • 0.39.6
  • 0.39.5
  • 0.39.3
  • 0.39.2
  • 0.39.1
  • 0.39.0
  • 0.38.4
  • 0.38.2
  • 0.38.1
  • 0.37.1
  • 0.37.0
  • 0.36.2
  • 0.36.1
  • 0.36.0
  • 0.35.3
  • 0.35.2
  • 0.35.1
  • 0.35.0
  • 0.34.4
  • 0.34.3-beta
  • 0.34.2-beta
  • 0.34.1-beta
  • 0.34.0-beta
  • 0.33.4-beta
  • 0.33.3-beta
  • 0.33.2-beta
  • 0.33.1-beta
  • 0.33.0-beta
  • 0.32.0-beta

Spaces and structures

The key-value surface over HTTP — keys with expiry, conditional set and counters, plus the list, hash, set and ranking operations — each one the engine's own operation, never a reimplementation.

A space is the store's key-value engine, and the app surface serves all of it: the cache verbs and the structure families.

Keys

methodpathanswers
GET…/spaces/{s}/keys?prefix={"keys": […]}
GET…/keys/{key}{"value": v, "ttl": … | null} or 404
PUT…/keys/{key}body one JSON value; {"set": bool}
DELETE…/keys/{key}{"deleted": true}
POST…/keys/{key}/incr?by=n{"value": n}

The key is the rest of the path, percent-encoded. PUT takes two query modifiers:

  • ?expire=30m — the key dies at its instant, like SET … EXPIRE.
  • ?if=absent / ?if=present — a conditional set; the answer's "set" says whether it landed, and a condition that did not hold is a 200 with "set": false, not an error.

Remember the space rule: a plain SET clears an expiry. Refreshing a session key means sending expire again, every time.

Structures

A key holding a list, hash, set or ranking is operated on with POST …/keys/{key}/{family}/{op} and a JSON body. Each answers {"value": …} — the operation's own answer: a length, a count, an element, a pair.

  • list — push {values, at?: front|back, if?} · pop {at?, limit?} · set {index, value} · trim {from, to} · remove {value, limit?, from_back?} · insert {value, before|after} · move {to, from?, at?}
  • hash — set {fields: {…}, if?: absent} · remove {fields: […]} · incr {field, by} · expire {fields, at: "<dur>", if?} · ttl {fields} · persist {fields}
  • members (sets) — add / remove {members: […]} · pop {limit?} · move {member, to}
  • scores (rankings) — add {members: {member: score}, if?, changed?} · incr {member, by} · remove {members} or {rank: {from, to}} or {score|member_range: {…}} · pop {highest?, limit?}
# A job queue on a list.
curl -X POST -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  'http://127.0.0.1:8000/v1/app/main/spaces/cache/keys/jobs/list/push' \
  -d '{"values": ["resize:42", "mail:17"], "at": "back"}'
# {"value":2}

# A leaderboard.
curl -X POST -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  'http://127.0.0.1:8000/v1/app/main/spaces/cache/keys/top/scores/add' \
  -d '{"members": {"ada": 10, "bob": 7}}'

A word the operation chooses between — front|back, before|after — is a closed set in the body, picked server-side; a field the operation does not take is a 400 naming it. A key already holding another kind answers the engine's own refusal (KeyHoldsAnotherKind, 400): a list key does not become a hash by asking nicely, exactly as in the language.

Every operation is the engine's own — the same atomicity, the same expiry semantics, the same grant checks a TessariQL statement meets. The surface adds no cache logic of its own, which is what makes it safe to mix: a key written over HTTP reads back identically in a script, in a client, and through the RESP port.