Skip to content
Hoody.com

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).

NameInTypeRequiredDescription
dbquerystringYesDatabase file path
tablequerystringNoCustom 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"]
}
{
"results": [
{ "key": "user:1", "value": "alice" },
{ "key": "user:2", "value": "bob" },
{ "key": "settings:theme", "value": "dark" }
],
"count": 3
}
Terminal window
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" \
-d '{
"keys": ["user:1", "user:2", "settings:theme"]
}'

Store values for multiple keys in a single transaction (max 100 items).

NameInTypeRequiredDescription
dbquerystringYesDatabase file path
tablequerystringNoCustom 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.

{
"items": [
{ "key": "user:1", "value": "alice" },
{ "key": "user:2", "value": "bob" },
{ "key": "settings:theme", "value": "dark" }
]
}
{
"count": 3,
"success": true
}
Terminal window
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" \
-d '{
"items": [
{ "key": "user:1", "value": "alice" },
{ "key": "user:2", "value": "bob" },
{ "key": "settings:theme", "value": "dark" }
]
}'

Delete multiple keys in a single transaction (max 100 keys).

NameInTypeRequiredDescription
dbquerystringYesDatabase file path
tablequerystringNoCustom 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"]
}
{
"deleted": 3,
"success": true
}
Terminal window
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" \
-d '{
"keys": ["user:1", "user:2", "settings:theme"]
}'