The Export API allows you to programmatically retrieve events from your applications for external analysis, data warehousing, or custom reporting.
Before accessing the Export API, you need to obtain an authentication token by logging in.
curl --location --request POST 'https://api.vexo.co/users/implicit/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "your-email@example.com",
"password": "your-password"
}'
Response:
{
"success": true,
"code": 200,
"message": null,
"data": {
"id": "5d10a838-1678-4110-a402-6eb0af88e41d",
"name": "Your Name",
"email": "your-email@example.com",
"token": "{AUTH_TOKEN}"
}
}
Use the token from the response in the Authorization header for all API requests.
Retrieve events for a specific application with optional filtering by date range and pagination.
Endpoint: GET /external/apps/{appId}/events
Headers:
Authorization: {token} - Required authentication token from loginParameters:
appId (path, required) - UUID of the applicationfrom (query, optional) - Start timestamp (Unix timestamp in milliseconds)to (query, optional) - End timestamp (Unix timestamp in milliseconds)itemsPerPage (query, optional) - Number of items per page (default: 10000, max: 10000)page (query, optional) - Page number (default: 1)Example Request:
curl --location --request GET 'https://api.vexo.co/external/apps/:appId/events?from=1640995200000&to=1641081600000&itemsPerPage=100&page=1' \
--header 'Authorization: {AUTH_TOKEN}'
Response Structure:
{
"success": true,
"code": 200,
"message": null,
"data": {
"totalItems": 1,
"page": 1,
"itemsPerPage": 10000,
"items": [
{
"id": "event-id",
"name": "screen_view",
"route": "/home",
"sessionId": "session-id",
"deviceId": "device-id",
"type": "screen",
"appVersion": "1.0.0",
"clientCreationDate": 1640995200000,
"serverReceivedDate": 1640995201000,
"clientCreationHumanReadableDate": "2021-12-31 12:00:00",
"serverReceivedHumanReadableDate": "2021-12-31 12:00:01",
"country": "US",
"city": "New York",
"deviceSystemName": "iOS",
"deviceSystemVersion": "15.0",
"deviceModel": "iPhone13,2",
"metadata": {
"custom_property": "value",
"user_id": "123",
"additional_data": "example"
}
}
]
}
}
Each event object contains the following fields:
| Field | Type | Description | Required |
|---|---|---|---|
id | string | Unique event identifier | Yes |
name | string | Event name (e.g., "screen_view", "button_click") | No |
route | string | Screen route or path | No |
sessionId | string | Session identifier | Yes |
deviceId | string | Device identifier | Yes |
type | string | Event type (e.g., "screen", "custom") | Yes |
appVersion | string | Application version | Yes |
clientCreationDate | number | Unix timestamp when event was created on client (milliseconds) | Yes |
serverReceivedDate | number | Unix timestamp when event was received by server (milliseconds) | Yes |
clientCreationHumanReadableDate | string | Human-readable client creation date | Yes |
serverReceivedHumanReadableDate | string | Human-readable server received date | Yes |
country | string | User's country | Yes |
city | string | User's city | No |
deviceSystemName | string | Operating system (e.g., "iOS", "Android") | No |
deviceSystemVersion | string | Operating system version | No |
deviceModel | string | Device model | No |
metadata | object | Custom event data and properties | No |
# Export all events for an app
curl --location --request GET 'https://api.vexo.co/external/apps/your-app-id/events' \
--header 'Authorization: {AUTH_TOKEN}'
# Export events from the last 24 hours
curl --location --request GET 'https://api.vexo.co/external/apps/your-app-id/events?from=1640908800000&to=1640995200000' \
--header 'Authorization: {AUTH_TOKEN}'
# Export events with pagination
curl --location --request GET 'https://api.vexo.co/external/apps/your-app-id/events?itemsPerPage=500&page=2' \
--header 'Authorization: {AUTH_TOKEN}'
| Status Code | Description |
|---|---|
401 | Invalid or expired authentication token |
403 | Access denied to the specified application |
404 | Application not found |
429 | Rate limit exceeded |
500 | Internal server error |