The KV Store batch endpoints let you read, write, or delete up to 100 keys in a single atomic request. Use them when you need to bulk-load configuration, hydrate a cache, or clean up many keys at once — they are significantly faster than issuing individual get/set/delete calls and are executed inside a single transaction for consistency.
All endpoints accept a JSON body describing the operation and identify the target database through the db query parameter. Optional table selects a non-default table name (default: kv_store).
Retrieve values for multiple keys in a single request (max 100 keys).
Name In Type Required Description dbquery string Yes Database file path tablequery string No Custom table name (default: kv_store)
The request body contains a keys array listing the keys to fetch. Up to 100 keys may be included per request.
" keys " : [ " user:1 " , " user:2 " , " settings:theme " ]
{ " key " : " user:1 " , " value " : " alice " },
{ " key " : " user:2 " , " value " : " bob " },
{ " key " : " settings:theme " , " value " : " dark " }
" message " : " Invalid database path " ,
" code " : " INVALID_DB_PATH "
Error Code Title Description Resolution INVALID_DB_PATHInvalid 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_PARAMETERSInvalid request parameters One or more request parameters are invalid or malformed Check parameter types and values against the API specification INVALID_SQLITE_HEADERNot 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_DIRECTORYPath 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
" error " : " Internal Server Error " ,
" message " : " Database operation failed " ,
Error Code Title Description Resolution DATABASE_ERRORDatabase operation failed An internal database error occurred Check server logs for details. Database may be corrupted or locked. FILE_SYSTEM_ERRORFile system error Failed to read or write filesystem in directory mode Check file permissions and disk space
curl -X POST " https://{projectId}-{containerId}-sqlite-1.{server}.containers.hoody.icu/api/v1/sqlite/kv/batch/get?db=app.db&table=kv_store " \
-H " Content-Type: application/json " \
"keys": ["user:1", "user:2", "settings:theme"]
import { HoodyClient } from " hoody-sdk " ;
const client = new HoodyClient ({
baseURL : " https://{projectId}-{containerId}-sqlite-1.{server}.containers.hoody.icu "
const result = await client . sqlite . kvStore . batchGet (
{ keys : [ " user:1 " , " user:2 " , " settings:theme " ] },
{ db : " app.db " , table : " kv_store " }
Store values for multiple keys in a single transaction (max 100 items).
Name In Type Required Description dbquery string Yes Database file path tablequery string No Custom table name (default: kv_store)
The request body contains an items array of key/value pairs to write. Up to 100 items may be included per request. All writes are committed atomically — either every item in the batch is persisted, or none are.
{ " key " : " user:1 " , " value " : " alice " },
{ " key " : " user:2 " , " value " : " bob " },
{ " key " : " settings:theme " , " value " : " dark " }
" message " : " Invalid database path " ,
" code " : " INVALID_DB_PATH "
Error Code Title Description Resolution INVALID_DB_PATHInvalid 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_PARAMETERSInvalid request parameters One or more request parameters are invalid or malformed Check parameter types and values against the API specification INVALID_SQLITE_HEADERNot 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_DIRECTORYPath 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
" error " : " Internal Server Error " ,
" message " : " Database operation failed " ,
Error Code Title Description Resolution DATABASE_ERRORDatabase operation failed An internal database error occurred Check server logs for details. Database may be corrupted or locked. FILE_SYSTEM_ERRORFile system error Failed to read or write filesystem in directory mode Check file permissions and disk space
curl -X POST " https://{projectId}-{containerId}-sqlite-1.{server}.containers.hoody.icu/api/v1/sqlite/kv/batch/set?db=app.db&table=kv_store " \
-H " Content-Type: application/json " \
{ "key": "user:1", "value": "alice" },
{ "key": "user:2", "value": "bob" },
{ "key": "settings:theme", "value": "dark" }
import { HoodyClient } from " hoody-sdk " ;
const client = new HoodyClient ({
baseURL : " https://{projectId}-{containerId}-sqlite-1.{server}.containers.hoody.icu "
const result = await client . sqlite . kvStore . batchSet (
{ key : " user:1 " , value : " alice " },
{ key : " user:2 " , value : " bob " },
{ key : " settings:theme " , value : " dark " }
{ db : " app.db " , table : " kv_store " }
Delete multiple keys in a single transaction (max 100 keys).
Name In Type Required Description dbquery string Yes Database file path tablequery string No Custom table name (default: kv_store)
The request body contains a keys array listing the keys to remove. Up to 100 keys may be included per request. Deletions are atomic — either all listed keys are removed, or none are.
" keys " : [ " user:1 " , " user:2 " , " settings:theme " ]
" message " : " Invalid database path " ,
" code " : " INVALID_DB_PATH "
Error Code Title Description Resolution INVALID_DB_PATHInvalid 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_PARAMETERSInvalid request parameters One or more request parameters are invalid or malformed Check parameter types and values against the API specification INVALID_SQLITE_HEADERNot 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_DIRECTORYPath 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
" error " : " Internal Server Error " ,
" message " : " Database operation failed " ,
Error Code Title Description Resolution DATABASE_ERRORDatabase operation failed An internal database error occurred Check server logs for details. Database may be corrupted or locked. FILE_SYSTEM_ERRORFile system error Failed to read or write filesystem in directory mode Check file permissions and disk space
curl -X POST " https://{projectId}-{containerId}-sqlite-1.{server}.containers.hoody.icu/api/v1/sqlite/kv/batch/delete?db=app.db&table=kv_store " \
-H " Content-Type: application/json " \
"keys": ["user:1", "user:2", "settings:theme"]
import { HoodyClient } from " hoody-sdk " ;
const client = new HoodyClient ({
baseURL : " https://{projectId}-{containerId}-sqlite-1.{server}.containers.hoody.icu "
const result = await client . sqlite . kvStore . batchDelete (
{ keys : [ " user:1 " , " user:2 " , " settings:theme " ] },
{ db : " app.db " , table : " kv_store " }