Event Management
Get an usage event using event id
Fetch details of a particular event using the event ID.
GET
/
events
/
{event_id}
curl --request GET \
--url https://api.togai.com/events/{event_id} \
--header 'Authorization: <authorization>'
{
"events": [
{
"eventPayload": {
"timestamp": "2023-02-23T14:25:10Z",
"schemaName": "travelCompletedEvent",
"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_BILLED",
"statusDescription": "Event ingestion completed successfully but the event is not associated with any bill plan."
}
}
]
}
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
event_id
string
requiredResponse
200 - application/json
events
object[]
requiredcurl --request GET \
--url https://api.togai.com/events/{event_id} \
--header 'Authorization: <authorization>'
{
"events": [
{
"eventPayload": {
"timestamp": "2023-02-23T14:25:10Z",
"schemaName": "travelCompletedEvent",
"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_BILLED",
"statusDescription": "Event ingestion completed successfully but the event is not associated with any bill plan."
}
}
]
}