Event Ingestion
Ingest events to Togai in batch
This API let’s you to ingest events in batch upto 1000 events.
Ingest large amounts of events up to 1000 in batches in an array using this API.
POST
/
ingestBatch
curl --request POST \
--url https://api.togai.com/ingestBatch \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"events": [
{
"timestamp": "2022-06-15T07:30:35.123",
"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"
}
},
{
"timestamp": "2022-06-15T07:30:35.123",
"schemaName": "sendMessageEvent",
"id": "c0b1306d-f506-43a6-856b-69221efaee6c",
"accountId": "1",
"attributes": [
{
"name": "messageSentCount",
"value": "50",
"unit": "None"
},
{
"name": "sizeOfMessage",
"value": "60",
"unit": "KiloBytes"
}
],
"dimensions": {
"location": "Seattle",
"costCenterCode": "1234",
"messageProviderName": "Twilio"
}
}
]
}'
{
"success": true
}
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
events
object[]
requiredResponse
202 - application/json
success
boolean
statusCode
integer
name
string
message
string
code
string
details
object
curl --request POST \
--url https://api.togai.com/ingestBatch \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"events": [
{
"timestamp": "2022-06-15T07:30:35.123",
"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"
}
},
{
"timestamp": "2022-06-15T07:30:35.123",
"schemaName": "sendMessageEvent",
"id": "c0b1306d-f506-43a6-856b-69221efaee6c",
"accountId": "1",
"attributes": [
{
"name": "messageSentCount",
"value": "50",
"unit": "None"
},
{
"name": "sizeOfMessage",
"value": "60",
"unit": "KiloBytes"
}
],
"dimensions": {
"location": "Seattle",
"costCenterCode": "1234",
"messageProviderName": "Twilio"
}
}
]
}'
{
"success": true
}