Skip to main content

getDocument

client.knowledge.getDocument(documentId: string): Promise<KnowledgeDocument>

Retrieves a specific document by its ID.

Returns the full details of a document including its metadata, processing status, and chunk count.

Parameters

ParameterTypeRequiredDescription
documentIdstringYesThe unique identifier of the document

Returns

Promise<KnowledgeDocument> — A promise that resolves to the

Example

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

const client = new CodeBoltClient();

const result = await client.knowledge.getDocument('documentId');
console.log(result);