Key-Value API
Key-value store API for Scalix Cloud with get, set, delete, exists, and list operations plus optional TTL on writes for caching and sessions.
REST API endpoints for Key-Value. 5 operations.
Delete keys
POST /v1/kv/delRemoves one or more keys from the tenant's key-value store (batch delete).
Auth: Bearer API key
Request body
application/json (required) — schema KvDelRequest.
Body for /v1/kv/del — one or more keys to delete (batch delete). Matches the implementation (crates/kvstore/src/api.rs DelRequest), which takes a keys array, not a single key.
| Field | Type | Required | Description |
|---|---|---|---|
keys | array<string> | Yes |
Responses
| Status | Description |
|---|---|
200 | Key deleted |
401 | Missing or invalid API key |
500 | Internal error |
operationId: kvDel
Check if a key exists
POST /v1/kv/existsReturns whether a key is present in the tenant's key-value store.
Auth: Bearer API key
Request body
application/json (required) — schema KvKeyRequest.
Body for /v1/kv/get, /v1/kv/exists — a single key.
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes |
Responses
| Status | Description |
|---|---|
200 | { exists: bool } |
401 | Missing or invalid API key |
500 | Internal error |
operationId: kvExists
Fetch a value by key
POST /v1/kv/getReads a single key from the tenant's key-value store; returns value: null if absent.
Auth: Bearer API key
Request body
application/json (required) — schema KvKeyRequest.
Body for /v1/kv/get, /v1/kv/exists — a single key.
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes |
Responses
| Status | Description |
|---|---|
200 | The stored value (or value: null if absent) |
401 | Missing or invalid API key |
500 | Internal error |
operationId: kvGet
List keys
POST /v1/kv/keysReturns the keys in the tenant's key-value store matching an optional glob pattern.
Auth: Bearer API key
Request body
application/json (required) — schema KvKeysRequest.
Body for /v1/kv/keys — list keys matching an optional glob pattern.
| Field | Type | Required | Description |
|---|---|---|---|
pattern | string | null | No | Glob pattern; defaults to * (all keys) when omitted. |
Responses
| Status | Description |
|---|---|
200 | { keys: [string] } matching the pattern |
401 | Missing or invalid API key |
500 | Internal error |
operationId: kvKeys
Set a value by key
POST /v1/kv/setWrites a value to the tenant's key-value store, with an optional TTL.
Auth: Bearer API key
Request body
application/json (required) — schema KvSetRequest.
Set a key in the key-value store. The downstream kvstore accepts a JSON value of any shape; ttl is in seconds and optional.
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | |
value | object | Yes | |
ttl | integer | null (int64) | No | Optional time-to-live in seconds. |
Responses
| Status | Description |
|---|---|
200 | Value set |
401 | Missing or invalid API key |
500 | Internal error |
operationId: kvSet