Skip to main content

getValue

client.kvStore.getValue(instanceId: string, namespace: string, key: string): Promise<KvValue>

Retrieves a value by its key within a specific namespace.

Looks up a single key-value pair in the specified instance and namespace. Returns the value along with its metadata.

Parameters​

ParameterTypeRequiredDescription
instanceIdstringYesThe unique identifier of the KV store instance
namespacestringYesThe namespace containing the key
keystringYesThe key to look up

Returns​

Promise<KvValue> — A promise that resolves to the including the stored data

Example​

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

const client = new CodeBoltClient();

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