Export event by ID

Export a single event by ID.

GET
https://api.croct.io/export/events/924f6c8f-3b5b-47ea-b483-25a0506dc436

Example

Here is an example of how to export a single event by ID:

12345678910
const eventId = '924f6c8f-3b5b-47ea-b483-25a0506dc436';const url = new URL(`https://api.croct.io/export/events/${eventId}`);
const response = await fetch(url, {  headers: {    'X-Api-Key': '<API KEY>',  },});
const {metadata, event} = await response.json();

Headers

This endpoint requires the following HTTP headers:

X-Api-Key
string

The API key of the application from which to export the event.

Parameters

This endpoint accepts the following path parameters:

eventId
string

The ID of the event in UUID format.

Response

This endpoint returns a JSON response with the following properties:

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.

Example response

Here is an example of a JSON response from this endpoint:

123456789101112131415161718192021
{  "metadata": {    "organizationName": "Lolaza",    "organizationSlug": "lolaza",    "workspaceName": "Boost CA",    "workspaceSlug": "boost-ca",    "applicationName": "Blog",    "applicationSlug": "blog"  },  "event": {    "id": "924f6c8f-3b5b-47ea-b483-25a0506dc436",    "sessionId": "964e328d-5459-4229-9565-0aef9fe0fca8",    "userId": "43bca1da-8a1a-4f87-be2a-23d802b860b8",    "timestamp": 1440979201000,    "context": null,    "payload": {      "type": "userSignedIn",      "externalUserId": "foo"    }  }}

If no event matches the given ID, the endpoint responds with a resource not found error.