Skip to content
Hoody.com

The Hoody KV Store records every query and every key mutation, making it possible to audit history, reconstruct past states, and roll back changes. Use these endpoints to list query executions, inspect per-key operation logs, snapshot the store at any timestamp, diff two snapshots, and safely undo changes.

Retrieve query execution history for a database with optional limit.

GET /api/v1/sqlite/history

NameInTypeRequiredDescription
dbquerystringYesDatabase file path
limitqueryintegerNoMaximum number of entries to return (default: 100)
Terminal window
curl -X GET "https://proj-a1b2c3-cont-x9y8z7-sqlite-1.eu-west-1.containers.hoody.com/api/v1/sqlite/history?db=app.db&limit=50" \
-H "Authorization: Bearer $HOODY_TOKEN"

Retrieve aggregated statistics about query execution history.

GET /api/v1/sqlite/history/stats

NameInTypeRequiredDescription
dbquerystringYesDatabase file path
Terminal window
curl -X GET "https://proj-a1b2c3-cont-x9y8z7-sqlite-1.eu-west-1.containers.hoody.com/api/v1/sqlite/history/stats?db=app.db" \
-H "Authorization: Bearer $HOODY_TOKEN"

Delete all query history entries for a database.

DELETE /api/v1/sqlite/history

NameInTypeRequiredDescription
dbquerystringYesDatabase file path
Terminal window
curl -X DELETE "https://proj-a1b2c3-cont-x9y8z7-sqlite-1.eu-west-1.containers.hoody.com/api/v1/sqlite/history?db=app.db" \
-H "Authorization: Bearer $HOODY_TOKEN"

Delete a specific query history entry by ID.

DELETE /api/v1/sqlite/history/{index}

NameInTypeRequiredDescription
indexpathintegerYesHistory entry ID
dbquerystringYesDatabase file path
Terminal window
curl -X DELETE "https://proj-a1b2c3-cont-x9y8z7-sqlite-1.eu-west-1.containers.hoody.com/api/v1/sqlite/history/42?db=app.db" \
-H "Authorization: Bearer $HOODY_TOKEN"

Retrieve the operation history for a specific key showing all changes over time.

GET /api/v1/sqlite/kv/{key}/history

NameInTypeRequiredDescription
keypathstringYesKey name
dbquerystringYesDatabase file path
tablequerystringNoCustom table name (default: kv_store)
limitqueryintegerNoMaximum number of operations to return (0 → default 50, clamped to maximum 1000) (default: 50)
Terminal window
curl -X GET "https://proj-a1b2c3-cont-x9y8z7-sqlite-1.eu-west-1.containers.hoody.com/api/v1/sqlite/kv/user:1001/history?db=app.db&limit=50" \
-H "Authorization: Bearer $HOODY_TOKEN"

Reconstruct the value of a key as it was at a specific operation number.

GET /api/v1/sqlite/kv/{key}/snapshot

NameInTypeRequiredDescription
keypathstringYesKey name
dbquerystringYesDatabase file path
tablequerystringNoCustom table name (default: kv_store)
op_numberqueryintegerYesOperation number to reconstruct from
Terminal window
curl -X GET "https://proj-a1b2c3-cont-x9y8z7-sqlite-1.eu-west-1.containers.hoody.com/api/v1/sqlite/kv/user:1001/snapshot?db=app.db&op_number=87" \
-H "Authorization: Bearer $HOODY_TOKEN"

Reconstruct the entire KV table state as it was at a specific timestamp.

GET /api/v1/sqlite/kv/snapshot

NameInTypeRequiredDescription
dbquerystringYesDatabase file path
tablequerystringNoCustom table name (default: kv_store)
timestampqueryintegerYesUnix timestamp to reconstruct from
limitqueryintegerNoMaximum number of keys to return (default: 100)
prefixquerystringNoFilter keys by prefix
Terminal window
curl -X GET "https://proj-a1b2c3-cont-x9y8z7-sqlite-1.eu-west-1.containers.hoody.com/api/v1/sqlite/kv/snapshot?db=app.db&timestamp=1700000000&limit=100&prefix=user:" \
-H "Authorization: Bearer $HOODY_TOKEN"

Compare the KV table state between two timestamps showing created, modified, and deleted keys.

GET /api/v1/sqlite/kv/diff

NameInTypeRequiredDescription
dbquerystringYesDatabase file path
tablequerystringNoCustom table name (default: kv_store)
fromqueryintegerYesStarting timestamp (Unix)
toqueryintegerYesEnding timestamp (Unix)
keysquerystringNoComma-separated list of keys to compare (optional)
Terminal window
curl -X GET "https://proj-a1b2c3-cont-x9y8z7-sqlite-1.eu-west-1.containers.hoody.com/api/v1/sqlite/kv/diff?db=app.db&from=1700000000&to=1700100000&keys=user:1001,user:1002" \
-H "Authorization: Bearer $HOODY_TOKEN"

Rollback a key to its previous state by undoing the last N operations.

POST /api/v1/sqlite/kv/{key}/rollback

NameInTypeRequiredDescription
keypathstringYesKey name
dbquerystringYesDatabase file path
tablequerystringNoCustom table name (default: kv_store)
stepsqueryintegerNoNumber of operations to rollback (default: 1)
Terminal window
curl -X POST "https://proj-a1b2c3-cont-x9y8z7-sqlite-1.eu-west-1.containers.hoody.com/api/v1/sqlite/kv/user:1001/rollback?db=app.db&steps=2" \
-H "Authorization: Bearer $HOODY_TOKEN"

Rollback the entire KV table to a specific timestamp. Pass dry_run=true to preview changes, or confirm=yes to execute.

POST /api/v1/sqlite/kv/rollback

NameInTypeRequiredDescription
dbquerystringYesDatabase file path
tablequerystringNoCustom table name (default: kv_store)
to_timestampqueryintegerYesTarget timestamp to rollback to (Unix)
dry_runquerybooleanNoPreview changes without applying (default: false)
confirmquerystringNoMust be ‘yes’ to execute actual rollback

Optional filters to scope the rollback to a subset of keys.

NameTypeRequiredDescription
keysarray of stringNoKeys to roll back. Omit or leave empty to roll back the whole table. At most 10000 entries; more is rejected with 413.
exclude_keysarray of stringNoKeys to leave untouched. Applied after keys. At most 10000 entries; more is rejected with 413.
Terminal window
curl -X POST "https://proj-a1b2c3-cont-x9y8z7-sqlite-1.eu-west-1.containers.hoody.com/api/v1/sqlite/kv/rollback?db=app.db&to_timestamp=1700000000&dry_run=false&confirm=yes" \
-H "Authorization: Bearer $HOODY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"keys": ["user:1001", "user:1002"],
"exclude_keys": ["user:1002"]
}'