Skip to main content

createEventsBatch

client.eventLog.createEventsBatch(data: CreateEventLogEventRequest[]): Promise<EventLogEvent[]>

Creates multiple events in a single batch operation.

More efficient than creating events one at a time when you have multiple events to record simultaneously.

Parameters

ParameterTypeRequiredDescription
dataCreateEventLogEventRequest[]YesAn array of event creation payloads

Returns

Promise<EventLogEvent[]> — A promise that resolves to an array of the created objects

Example

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

const client = new CodeBoltClient();

const result = await client.eventLog.createEventsBatch(/* CreateEventLogEventRequest[] */);
console.log(result);