SQLite: Key-Value Store
Section titled “SQLite: Key-Value Store”List and discover keys stored in the Hoody SQLite-backed KV store. This endpoint supports prefix filtering, pagination, and historical (time-travel) key listing via at_timestamp. Use these operations when you need to enumerate stored keys, inspect the keyspace at a previous point in time, or paginate through very large key sets.
GET /api/v1/sqlite/kv
Section titled “GET /api/v1/sqlite/kv”List all keys in the KV store with optional filtering and pagination.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
db | query | string | Yes | Database file path or directory |
table | query | string | No | Custom table name. Default: kv_store |
prefix | query | string | No | Filter keys by prefix |
limit | query | integer | No | Maximum number of results. Default: 100 |
offset | query | integer | No | Skip N results for pagination (regular LIST only; ignored when at_timestamp is set). Default: 0 |
at_timestamp | query | integer | No | Unix timestamp for time-travel LIST (selects handleKVListAtTimestamp; returns a different envelope and ignores offset) |
This endpoint accepts no request body.
curl -G "https://api.hoody.com/api/v1/sqlite/kv" \ -H "Authorization: Bearer <token>" \ --data-urlencode "db=./app.db" \ --data-urlencode "prefix=user:" \ --data-urlencode "limit=50"const result = await client.sqlite.kvStore.list({ db: "./app.db", prefix: "user:", limit: 50,});
// result.keys: string[]// result.count: number// result.limit: number// result.offset: number// result.prefix: string{ "keys": [ "user:1001:profile", "user:1002:profile", "user:1003:profile", "user:1004:profile", "user:1005:profile" ], "count": 5, "limit": 50, "offset": 0, "prefix": "user:"}{ "statusCode": 400, "error": "Bad Request", "message": "Invalid database path"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
INVALID_DB_PATH | Invalid database path | The provided database path is invalid or inaccessible | Provide a valid absolute path, or use bare name / ./name shorthand (resolved to /hoody/databases/*.db) |
INVALID_PARAMETERS | Invalid request parameters | One or more request parameters are invalid or malformed | Check parameter types and values against the API specification |
INVALID_SQLITE_HEADER | Not a valid SQLite database | The file exists but is not a valid SQLite database | Ensure the file is a valid SQLite database with proper header |
PATH_IS_DIRECTORY | Path is a directory | Expected a .db file but got a directory (use table parameter for directory mode) | Use a .db file path or add table parameter for directory mode KV store |
{ "statusCode": 500, "error": "Internal Server Error", "message": "Database operation failed"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
DATABASE_ERROR | Database operation failed | An internal database error occurred | Check server logs for details. Database may be corrupted or locked. |
FILE_SYSTEM_ERROR | File system error | Failed to read or write filesystem in directory mode | Check file permissions and disk space |
{ "statusCode": 503, "error": "Service Unavailable", "message": "Request deadline exceeded before commit (at_timestamp mode under heavy maintenance / very large candidate set)"}