Skip to content

The KV store maintains a full operation log so you can inspect how your data changed, reconstruct the state at any past point, and roll back unwanted mutations. Use these endpoints to audit, debug, and recover from accidental writes. Two surfaces are exposed: general query history for any SQLite database, and KV store time-travel for inspecting and rewinding specific keys or entire tables.


Inspect, summarize, and manage the SQL query history recorded for each database file.

Retrieve query execution history for a database with optional limit.

NameInTypeRequiredDescription
dbquerystringYesDatabase file path
limitqueryintegerNoMaximum number of entries to return (default 100)
Terminal window
curl -G "https://api.hoody.com/api/v1/sqlite/history" \
-H "Authorization: Bearer <token>" \
--data-urlencode "db=app.db" \
--data-urlencode "limit=50"

Retrieve aggregated statistics about query execution history.

NameInTypeRequiredDescription
dbquerystringYesDatabase file path
Terminal window
curl -G "https://api.hoody.com/api/v1/sqlite/history/stats" \
-H "Authorization: Bearer <token>" \
--data-urlencode "db=app.db"

Delete all query history entries for a database.

NameInTypeRequiredDescription
dbquerystringYesDatabase file path
Terminal window
curl -X DELETE "https://api.hoody.com/api/v1/sqlite/history?db=app.db" \
-H "Authorization: Bearer <token>"

Delete a specific query history entry by ID.

NameInTypeRequiredDescription
indexpathintegerYesHistory entry ID
dbquerystringYesDatabase file path
Terminal window
curl -X DELETE "https://api.hoody.com/api/v1/sqlite/history/42?db=app.db" \
-H "Authorization: Bearer <token>"

Reconstruct past key/table states, compare snapshots across time windows, and rewind changes for individual keys or entire tables.

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

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 -G "https://api.hoody.com/api/v1/sqlite/kv/user:1234/history" \
-H "Authorization: Bearer <token>" \
--data-urlencode "db=app.db" \
--data-urlencode "limit=50"

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

NameInTypeRequiredDescription
keypathstringYesKey name
dbquerystringYesDatabase file path
tablequerystringNoCustom table name (default "kv_store")
op_numberqueryintegerYesOperation number to reconstruct from
Terminal window
curl -G "https://api.hoody.com/api/v1/sqlite/kv/user:1234/snapshot" \
-H "Authorization: Bearer <token>" \
--data-urlencode "db=app.db" \
--data-urlencode "op_number=1"

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

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 -G "https://api.hoody.com/api/v1/sqlite/kv/snapshot" \
-H "Authorization: Bearer <token>" \
--data-urlencode "db=app.db" \
--data-urlencode "timestamp=1700000000" \
--data-urlencode "limit=100" \
--data-urlencode "prefix=user:"

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

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 -G "https://api.hoody.com/api/v1/sqlite/kv/diff" \
-H "Authorization: Bearer <token>" \
--data-urlencode "db=app.db" \
--data-urlencode "from=1700000000" \
--data-urlencode "to=1700010000" \
--data-urlencode "keys=user:1234,user:5678"

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

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://api.hoody.com/api/v1/sqlite/kv/user:1234/rollback?db=app.db&steps=1" \
-H "Authorization: Bearer <token>"

Rollback the entire KV table to a specific timestamp.

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

The request body schema for this endpoint is empty — no body fields are defined.

Terminal window
# Dry run to preview
curl -X POST "https://api.hoody.com/api/v1/sqlite/kv/rollback?db=app.db&to_timestamp=1700000000&dry_run=true" \
-H "Authorization: Bearer <token>"
# Actual rollback
curl -X POST "https://api.hoody.com/api/v1/sqlite/kv/rollback?db=app.db&to_timestamp=1700000000&confirm=yes" \
-H "Authorization: Bearer <token>"