ScalixScalix Docs

Key-Value API

Key-value store

REST API endpoints for Key-Value. 5 operations.

Delete keys

plaintext
POST /v1/kv/del

Removes one or more keys from the tenant's key-value store (batch delete).

Auth: Bearer API key

Request body

application/json (required) — schema KvDelRequest.

Responses

StatusDescription
200Key deleted
401Missing or invalid API key
500Internal error

operationId: kvDel

Check if a key exists

plaintext
POST /v1/kv/exists

Returns whether a key is present in the tenant's key-value store.

Auth: Bearer API key

Request body

application/json (required) — schema KvKeyRequest.

Responses

StatusDescription
200{ exists: bool }
401Missing or invalid API key
500Internal error

operationId: kvExists

Fetch a value by key

plaintext
POST /v1/kv/get

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

Responses

StatusDescription
200The stored value (or value: null if absent)
401Missing or invalid API key
500Internal error

operationId: kvGet

List keys

plaintext
POST /v1/kv/keys

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

Responses

StatusDescription
200{ keys: [string] } matching the pattern
401Missing or invalid API key
500Internal error

operationId: kvKeys

Set a value by key

plaintext
POST /v1/kv/set

Writes a value to the tenant's key-value store, with an optional TTL.

Auth: Bearer API key

Request body

application/json (required) — schema KvSetRequest.

Responses

StatusDescription
200Value set
401Missing or invalid API key
500Internal error

operationId: kvSet