Skip to main content

deleteNamespace

client.kvStore.deleteNamespace(instanceId: string, namespace: string): Promise<unknown>

Deletes all key-value pairs within a namespace.

Clears the entire namespace, removing every key and its associated value. Other namespaces in the instance are not affected.

Parameters

ParameterTypeRequiredDescription
instanceIdstringYesThe unique identifier of the KV store instance
namespacestringYesThe namespace to delete

Returns

Promise<unknown> — A promise that resolves when the namespace has been cleared

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.kvStore.deleteNamespace('instanceId', 'namespace');
console.log(result);