Skip to main content

updateRecord

client.knowledgeGraph.updateRecord(id: string, recordId: string, data: UpdateKGRecordRequest): Promise<KGRecord>

Updates a record in a knowledge graph instance.

Modifies the record's properties or type. Only the fields provided in the request body are updated.

Parameters​

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the graph instance
recordIdstringYesThe unique identifier of the record to update
dataUpdateKGRecordRequestYesThe fields to update on the record

Returns​

Promise<KGRecord> — A promise that resolves to the updated

Example​

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

const client = new CodeBoltClient();

const result = await client.knowledgeGraph.updateRecord('id', 'recordId', /* UpdateKGRecordRequest */);
console.log(result);