Skip to main content

getCollection

client.vectorDb.getCollection(id: string): Promise<VectorCollection>

Retrieves a vector collection by its ID.

Fetches detailed information about a specific collection including its configuration, statistics, and metadata. Use this to inspect collection properties or verify collection existence.

Parameters

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the collection to retrieve

Returns

Promise<VectorCollection> — A promise that resolves to the VectorCollection object

Example

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

const client = new CodeBoltClient();

const result = await client.vectorDb.getCollection('id');
console.log(result);