- Postman collection
- Open API spec
Authentication
Customers
Accounts
Aliases
Event Schemas
Usage Meters
AddOns
Licenses
Feature
Price Plans
Settings
Price Experimentation
Jobs
Event Ingestion
Entitlements
Event Management
Metrics
Credits
Invoices
Payments
Wallet
InvoiceGroups
APIs
Get an event using event id
Fetch details of a particular event using the event ID.
curl --request GET \
--url https://api.togai.com/events/{event_id} \
--header 'Authorization: Bearer <token>'
{
"events": [
{
"eventPayload": {
"timestamp": "2023-02-23T14:25:10Z",
"schemaName": "travelCompletedEvent",
"referenceId": "event.dsvhk32.234n3",
"id": "c0b1306d-f506-43a6-856b-69221efaee6b",
"accountId": "1",
"attributes": [
{
"name": "distanceTravelled",
"value": "50",
"unit": "Miles"
},
{
"name": "timeSpent",
"value": "60",
"unit": "Minutes"
}
],
"dimensions": {
"location": "Seattle",
"costCenterCode": "1234",
"travelType": "Business"
}
},
"eventPipelineInfo": {
"eventSchema": {
"name": "Rides",
"version": 1
},
"usageMeters": [
{
"id": "23bh55ZZdifACTAV9WEV",
"name": "rides_distance",
"version": 1,
"status": "PROCESSED_UNITS_COMPUTED",
"units": 10.42
},
{
"id": "23bh55ZZdifACTAV9WEV",
"name": "rides_time",
"version": 1,
"status": "PROCESSED_FILTERED_OUT"
}
],
"pricePlans": [
{
"name": "pro-plan",
"id": "68551191-982b-4663-92fa-38a6f8313e91",
"scheduleId": "c0b1306d-f506-43a6-856b-69221efaee6b",
"cycleStart": "04-03-2022",
"cycleEnd": "04-04-2022"
}
],
"account": {
"id": "acme-prod"
},
"customer": {
"id": "acme_inc"
}
},
"ingestionStatus": {
"status": "INGESTION_COMPLETED_EVENT_NOT_METERED",
"statusDescription": "Event ingestion completed successfully but the event is not associated with any bill plan."
},
"createdAt": "2021-03-04T14:25:10Z"
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Response
Unique id generated by Togai to identify an event uniquely
Contents of the event
Name of the Event Schema. Know more about event schema
Togai restricts users to ingest events with same id within a period of 45 days. This restriction is common for /entitled API, /ingest API and /ingestBatch API. i.e, an id used on /ingest API will not be allowed on /ingestBatch or /entitled APIs
Source time stamp of the event. This timestamp must be in ISO 8601 format.
The event will be associated with the provided account
Attributes are numeric values. It can be usage metric which you push to Togai
Name of the event attribute
Value of the event attribute
Unit with which the attribute value was measured. Natively supported units - "Meters, Miles, Kilometers, Grams, Kilograms, ounces, Pounds, Minutes, Hours, Seconds, Milliseconds, Microseconds, None". Clients are free to add any other custom units.
Dimensions are tags/labels associated with the events.
Status about the event ingestion.
Ingestion status
INGESTION_IN_PROGRESS
, INGESTION_FAILED
, INGESTION_FAILED_SCHEMA_NOT_DEFINED
, INGESTION_FAILED_ENRICHMENT_FAILED
, INGESTION_FAILED_UNITS_INVALID
, INGESTION_COMPLETED_NO_MATCHING_METERS
, INGESTION_COMPLETED_EVENT_METERED
, INGESTION_COMPLETED_EVENT_NOT_METERED
, INGESTION_FAILED_PAST_GRACE_PERIOD
, INGESTION_FAILED_ACCOUNT_NOT_FOUND
, INGESTION_FAILED_DUPLICATE_EVENT
, INGESTION_FAILED_NO_EVENT_ID
, INGESTION_FAILED_INVALID_NAMED_LICENSE_EVENT
, REVERTED
, UNKNOWN
The associated account belongs to this customer
Source of ingestion of event
Unique identifier representing the source
Type of source
Created time stamp of the event. This timestamp must be in ISO 8601 format.
Information related to ingestion of an event
PROCESSED_FILTERED_OUT
, PROCESSED_UNITS_COMPUTED
ATTRIBUTE
, DIMENSION
ATTRIBUTE
, DIMENSION
SETTING
curl --request GET \
--url https://api.togai.com/events/{event_id} \
--header 'Authorization: Bearer <token>'
{
"events": [
{
"eventPayload": {
"timestamp": "2023-02-23T14:25:10Z",
"schemaName": "travelCompletedEvent",
"referenceId": "event.dsvhk32.234n3",
"id": "c0b1306d-f506-43a6-856b-69221efaee6b",
"accountId": "1",
"attributes": [
{
"name": "distanceTravelled",
"value": "50",
"unit": "Miles"
},
{
"name": "timeSpent",
"value": "60",
"unit": "Minutes"
}
],
"dimensions": {
"location": "Seattle",
"costCenterCode": "1234",
"travelType": "Business"
}
},
"eventPipelineInfo": {
"eventSchema": {
"name": "Rides",
"version": 1
},
"usageMeters": [
{
"id": "23bh55ZZdifACTAV9WEV",
"name": "rides_distance",
"version": 1,
"status": "PROCESSED_UNITS_COMPUTED",
"units": 10.42
},
{
"id": "23bh55ZZdifACTAV9WEV",
"name": "rides_time",
"version": 1,
"status": "PROCESSED_FILTERED_OUT"
}
],
"pricePlans": [
{
"name": "pro-plan",
"id": "68551191-982b-4663-92fa-38a6f8313e91",
"scheduleId": "c0b1306d-f506-43a6-856b-69221efaee6b",
"cycleStart": "04-03-2022",
"cycleEnd": "04-04-2022"
}
],
"account": {
"id": "acme-prod"
},
"customer": {
"id": "acme_inc"
}
},
"ingestionStatus": {
"status": "INGESTION_COMPLETED_EVENT_NOT_METERED",
"statusDescription": "Event ingestion completed successfully but the event is not associated with any bill plan."
},
"createdAt": "2021-03-04T14:25:10Z"
}
]
}