exportEventById
Export a single event by ID.
This method exports a single event by its ID.
Signature
This method has the following signature:
TypeScript
exportEventById(options: {eventId: string}): Promise<{data: SingleEventResponse}>Example
Here is an example of how to use this method:
TypeScript
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:
Return
This method returns the following response:
- metadataobject
Metadata about the workspace and application.
- organizationNamestring
The name of the organization.
- organizationSlugstring
The URL-friendly identifier of the organization.
- workspaceNamestring
The name of the workspace.
- workspaceSlugstring
The URL-friendly identifier of the workspace.
- applicationNamestring
The name of the application.
- applicationSlugstring
The URL-friendly identifier of the application.
- organizationName
- 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.