Skip to main content

EventLog API

The eventLog module of the @codebolt/plugin-sdk.

import plugin from '@codebolt/plugin-sdk';

Quick Reference​

MethodDescription
appendEventAppend a single event to the log
appendEventsAppend multiple events to the log
createInstanceCreate a new event log instance
deleteInstanceDelete an event log instance
getInstanceGet an event log instance by ID
getInstanceStatsGet instance statistics
listInstancesList all event log instances
queryEventsQuery events using DSL
updateInstanceUpdate an event log instance

Methods​


appendEvent​

plugin.eventLog.appendEvent(params: AppendEventParams): Promise<EventLogAppendResponse>

Append a single event to the log

ParameterTypeRequiredDescription
paramsAppendEventParamsYesEvent parameters

Returns: Promise<EventLogAppendResponse>

Full reference →


appendEvents​

plugin.eventLog.appendEvents(params: AppendEventsParams): Promise<EventLogAppendMultipleResponse>

Append multiple events to the log

ParameterTypeRequiredDescription
paramsAppendEventsParamsYesEvents parameters

Returns: Promise<EventLogAppendMultipleResponse>

Full reference →


createInstance​

plugin.eventLog.createInstance(name: string, description?: string): Promise<EventLogInstanceResponse>

Create a new event log instance

ParameterTypeRequiredDescription
namestringYesInstance name
descriptionstringNoOptional description

Returns: Promise<EventLogInstanceResponse>

Full reference →


deleteInstance​

plugin.eventLog.deleteInstance(instanceId: string): Promise<EventLogInstanceResponse>

Delete an event log instance

ParameterTypeRequiredDescription
instanceIdstringYesInstance ID

Returns: Promise<EventLogInstanceResponse>

Full reference →


getInstance​

plugin.eventLog.getInstance(instanceId: string): Promise<EventLogInstanceResponse>

Get an event log instance by ID

ParameterTypeRequiredDescription
instanceIdstringYesInstance ID

Returns: Promise<EventLogInstanceResponse>

Full reference →


getInstanceStats​

plugin.eventLog.getInstanceStats(instanceId: string): Promise<EventLogStatsResponse>

Get instance statistics

ParameterTypeRequiredDescription
instanceIdstringYesInstance ID

Returns: Promise<EventLogStatsResponse>

Full reference →


listInstances​

plugin.eventLog.listInstances(): Promise<EventLogInstanceListResponse>

List all event log instances

No parameters.

Returns: Promise<EventLogInstanceListResponse>

Full reference →


queryEvents​

plugin.eventLog.queryEvents(query: EventLogDSL): Promise<EventLogQueryResponse>

Query events using DSL

ParameterTypeRequiredDescription
queryEventLogDSLYesQuery DSL object

Returns: Promise<EventLogQueryResponse>

Full reference →


updateInstance​

plugin.eventLog.updateInstance(instanceId: string, updates: UpdateEventLogInstanceParams): Promise<EventLogInstanceResponse>

Update an event log instance

ParameterTypeRequiredDescription
instanceIdstringYesInstance ID
updatesUpdateEventLogInstanceParamsYesUpdate parameters

Returns: Promise<EventLogInstanceResponse>

Full reference →