Event Schemas
List event schemas
Introduction
APIs
- Authentication
- Customers
- Accounts
- Aliases
- Event Schemas
- Usage Meters
- AddOns
- Licenses
- Feature
- (Deprecated) Price Plans
- Price Plan V2
- Settings
- Price Experimentation
- Jobs
- Event Ingestion
- Entitlements
- Event Management
- Metrics
- Credits
- Invoices
- Payments
- Wallet
- InvoiceGroups
- Alerts
- Reports
Event Schemas
List event schemas
Returns a list of event schema with pagination.
GET
/
event_schema
curl --request GET \
--url https://api.togai.com/event_schema \
--header 'Authorization: Bearer <token>'
{
"data": [
{
"name": "ride_completed",
"description": "Cab ride completed",
"version": 1,
"status": "DRAFT",
"attributes": [
{
"name": "distance"
},
{
"name": "time"
}
],
"dimensions": [
{
"name": "city"
},
{
"name": "ride_type"
}
],
"usageMetersCount": 10
}
],
"nextToken": "eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEwMCwgInNvcnRPcmRlciI6ICJhc2MifQ==",
"context": {
"pageSize": 10
}
}
Status of the event schema (`ACTIVE`, `ARCHIVED`)
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Query Parameters
Filter by provided status
Available options:
ACTIVE
, INACTIVE
Example:
"eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEwMCwgInNvcnRPcmRlciI6ICJhc2MifQ=="
Example:
10
Response
200
application/json
Response for list events request
Structure of an event schema
Name of the event. Must be unique for an organization.
Maximum length:
50
Version of event schema
Required range:
x >= 1
Example:
1
Description of the event
Maximum length:
255
Status of event schema
- DRAFT - Schema is in draft state
- ACTIVE - Schema is currently active
- INACTIVE - Schema is currently inactive
- ARCHIVED - Older version of event schema
Available options:
DRAFT
, ACTIVE
, INACTIVE
, ARCHIVED
Example:
"DRAFT"
Structure of dimensions
Name of the event dimension
Maximum length:
50
Example:
"city"
Available options:
ATTRIBUTE
, DIMENSION
Available options:
VALUE
, JSON_LOGIC
, JSON_LOGIC_FROM_DEPENDENCY
Template used to generate event id based on event payload
curl --request GET \
--url https://api.togai.com/event_schema \
--header 'Authorization: Bearer <token>'
{
"data": [
{
"name": "ride_completed",
"description": "Cab ride completed",
"version": 1,
"status": "DRAFT",
"attributes": [
{
"name": "distance"
},
{
"name": "time"
}
],
"dimensions": [
{
"name": "city"
},
{
"name": "ride_type"
}
],
"usageMetersCount": 10
}
],
"nextToken": "eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEwMCwgInNvcnRPcmRlciI6ICJhc2MifQ==",
"context": {
"pageSize": 10
}
}