Skip to main content

listRecords

client.knowledgeGraph.listRecords(id: string, params?: Record<string, unknown>): Promise<KGRecord[]>

Lists all records in a knowledge graph instance.

Returns the nodes in the graph with their types and properties. Use optional parameters to filter by type or paginate results.

Parameters​

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the graph instance
paramsRecord<string, unknown>NoOptional query parameters for filtering or pagination

Returns​

Promise<KGRecord[]> — A promise that resolves to an array of objects

Example​

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

const client = new CodeBoltClient();

const result = await client.knowledgeGraph.listRecords('id');
console.log(result);