exportEventById

Export a single event by ID.

This method exports a single event by its ID.

Signature

This method has the following signature:

exportEventById(options: {eventId: string}): Promise<{data: SingleEventResponse}>

Example

Here is an example of how to use this method:

123456789101112131415
import {Configuration, ExportApi} from '@croct/export';
async function getEvent(): Promise<void> {  const api = new ExportApi(    new Configuration({      apiKey: '<API KEY>'    })  );
  const {data: {metadata, event}} = await api.exportEventById({    eventId: '924f6c8f-3b5b-47ea-b483-25a0506dc436',  });
  console.log(event);}

Parameters

The following list describes the supported parameters:

options
object

The request parameters.

eventId
string

The ID of the event in UUID format.

Return

This method returns the following response:

metadata
object

Metadata about the workspace and application.

organizationName
string

The name of the organization.

organizationSlug
string

The URL-friendly identifier of the organization.

workspaceName
string

The name of the workspace.

workspaceSlug
string

The URL-friendly identifier of the workspace.

applicationName
string

The name of the application.

applicationSlug
string

The URL-friendly identifier of the application.

event

The exported event.

See the Event types reference for the complete event structure.

If no event matches the given ID, the method throws a resource not found error.