Skip to content

Use these endpoints to perform CRUD-style operations on key-value pairs stored in SQLite-backed databases. The KV store supports hierarchical keys (using /), JSON path extraction for nested values, optional TTL, history tracking, and atomic numeric counters.

Retrieve a value from the KV store. Supports JSON path extraction for pulling nested values from stored JSON, and time-travel queries via at_timestamp to read the value as it existed at a specific point in history.

NameInTypeRequiredDescription
keypathstringYesKey name (supports / for hierarchical keys)
dbquerystringYesDatabase file path or directory
tablequerystringNoCustom table name (default: "kv_store")
pathquerystringNoJSON path for nested value extraction
at_timestampqueryintegerNoUnix timestamp for time-travel query (selects handleKVAtTimestamp)
rebuildquerybooleanNoRebuild cache (directory mode only)
Terminal window
curl -G "https://api.hoody.com/api/v1/sqlite/kv/user:42:profile" \
--data-urlencode "db=app.db" \
--data-urlencode "path=/email"

Atomically increment a numeric value stored at the key. The operation is safe for concurrent callers. Use the path parameter to target a nested numeric value inside a stored JSON object.

NameInTypeRequiredDescription
keypathstringYesKey name
dbquerystringYesDatabase file path
tablequerystringNoCustom table name (default: "kv_store")
deltaqueryintegerNoAmount to increment (default: 1)
pathquerystringNoJSON path to nested numeric value
historyquerybooleanNoEnable history tracking (default: true)
Terminal window
curl -X POST -G "https://api.hoody.com/api/v1/sqlite/kv/visitors/counter/incr" \
--data-urlencode "db=app.db" \
--data-urlencode "delta=1"

Atomically decrement a numeric value stored at the key. The operation is safe for concurrent callers. Use the path parameter to target a nested numeric value inside a stored JSON object.

NameInTypeRequiredDescription
keypathstringYesKey name
dbquerystringYesDatabase file path
tablequerystringNoCustom table name (default: "kv_store")
deltaqueryintegerNoAmount to decrement (default: 1)
pathquerystringNoJSON path to nested numeric value
historyquerybooleanNoEnable history tracking (default: true)
Terminal window
curl -X POST -G "https://api.hoody.com/api/v1/sqlite/kv/inventory/seats/decr" \
--data-urlencode "db=app.db" \
--data-urlencode "delta=1"

Store or update a value at the given key. Supports optional TTL for automatic expiration, JSON path updates to mutate nested values without rewriting the whole document, and compare-and-swap semantics via if_match for safe concurrent updates.

NameInTypeRequiredDescription
keypathstringYesKey name
dbquerystringYesDatabase file path
tablequerystringNoCustom table name (default: "kv_store")
pathquerystringNoJSON path for nested value update
ttlqueryintegerNoTime-to-live in seconds
if_matchquerystringNoCurrent value for compare-and-swap
historyquerybooleanNoEnable history tracking (default: true)
create_db_if_missingquerybooleanNoCreate database file if it is missing (default: false)

The request body contains the raw value to store. Send it as application/json, application/octet-stream, or any other text content type.

Terminal window
curl -X PUT "https://api.hoody.com/api/v1/sqlite/kv/user:42:profile?db=app.db&ttl=3600" \
-H "Content-Type: application/json" \
-d '{"name":"Alice","email":"alice@example.com","plan":"pro"}'

Remove a key-value pair from the store. The operation is idempotent: deleting a key that has already been removed (or expired) returns 404.

NameInTypeRequiredDescription
keypathstringYesKey name
dbquerystringYesDatabase file path or directory
tablequerystringNoCustom table name (default: "kv_store")
historyquerybooleanNoEnable history tracking (default: true)
Terminal window
curl -X DELETE -G "https://api.hoody.com/api/v1/sqlite/kv/user:42:profile" \
--data-urlencode "db=app.db"

Check whether a key exists without retrieving its value. Useful as a lightweight precondition check before issuing a write, or to detect whether a TTL-bound key has expired.

NameInTypeRequiredDescription
keypathstringYesKey name
dbquerystringYesDatabase file path or directory
tablequerystringNoCustom table name (default: "kv_store")
Terminal window
curl -I -G "https://api.hoody.com/api/v1/sqlite/kv/user:42:profile" \
--data-urlencode "db=app.db"