Skip to main content

EventLog API

Event Log API

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

const client = new CodeBoltClient();

Quick Reference

MethodDescription
createEventCreates a new event within an event log instance.
createEventsBatchCreates multiple events in a single batch operation.
createInstanceCreates a new event log instance.
deleteInstanceDeletes an event log instance and all its associated events.
getInstanceRetrieves a specific event log instance by its ID.
listInstancesLists all event log instances.
queryQueries events using filter criteria.
updateInstanceUpdates an existing event log instance.

Methods


createEvent

client.eventLog.createEvent(data: CreateEventLogEventRequest): Promise<EventLogEvent>

Creates a new event within an event log instance.

Records a single event with its type, payload, and timestamp. Events are immutable once created.

ParameterTypeRequiredDescription
dataCreateEventLogEventRequestYesEvent creation payload including instance ID, type, and data

Returns: Promise<EventLogEvent> — A promise that resolves to the newly created

Full reference →


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.

ParameterTypeRequiredDescription
dataCreateEventLogEventRequest[]YesAn array of event creation payloads

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

Full reference →


createInstance

client.eventLog.createInstance(data: CreateEventLogInstanceRequest): Promise<EventLogInstance>

Creates a new event log instance.

An event log instance acts as a container that groups related events together. Create one per logical context (e.g., per agent session or workflow).

ParameterTypeRequiredDescription
dataCreateEventLogInstanceRequestYesInstance creation payload including name and configuration

Returns: Promise<EventLogInstance> — A promise that resolves to the newly created

Full reference →


deleteInstance

client.eventLog.deleteInstance(id: string): Promise<unknown>

Deletes an event log instance and all its associated events.

Permanently removes the instance. This action cannot be undone.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the event log instance to delete

Returns: Promise<unknown> — A promise that resolves when deletion is complete

Full reference →


getInstance

client.eventLog.getInstance(id: string): Promise<EventLogInstance>

Retrieves a specific event log instance by its ID.

Returns the full details of a single event log instance including its metadata and configuration.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the event log instance

Returns: Promise<EventLogInstance> — A promise that resolves to the

Full reference →


listInstances

client.eventLog.listInstances(params?: Record<string, unknown>): Promise<EventLogInstance[]>

Lists all event log instances.

Returns every event log instance in the system. Use optional parameters to filter or paginate the results.

ParameterTypeRequiredDescription
paramsRecord<string, unknown>NoOptional query parameters for filtering or pagination

Returns: Promise<EventLogInstance[]> — A promise that resolves to an array of objects

Full reference →


query

client.eventLog.query(data: EventLogQueryRequest): Promise<EventLogEvent[]>

Queries events using filter criteria.

Searches across event log instances to find events matching specific types, time ranges, or other filter conditions.

ParameterTypeRequiredDescription
dataEventLogQueryRequestYesQuery parameters specifying filters and sorting

Returns: Promise<EventLogEvent[]> — A promise that resolves to an array of matching objects

Full reference →


updateInstance

client.eventLog.updateInstance(id: string, data: UpdateEventLogInstanceRequest): Promise<EventLogInstance>

Updates an existing event log instance.

Modifies the instance's properties such as name, description, or configuration settings.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the event log instance to update
dataUpdateEventLogInstanceRequestYesThe fields to update

Returns: Promise<EventLogInstance> — A promise that resolves to the updated

Full reference →