POST
/
ingest
curl --request POST \
--url https://api.togai.com/ingest \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"event": {
"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"
}
}
}'
{
  "success": true,
  "statusCode": 123,
  "name": "<string>",
  "message": "<string>",
  "code": "<string>",
  "details": {}
}

Pre-Defined event types other than raw events

  1. Named License Event: For ingesting named license related events.

    • Schema Name: togai-named-license

    • Required dimensions:

      1. license_id: ID of the license
      2. name: Unique name of the license
    • Required attributes:

      1. action: Action performed on the license, supported values are 1 or -1 for add and remove respectively
  2. Usage Event: For ingesting usage directly to usage meters.

    • Schema Name: togai-usage

    • Required dimensions:

      1. usage_meter_id: ID of the usage meter
    • Required attributes:

      1. usage: Usage Value

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request body to ingest events to Togai usage and billing management service.

Payload for ingesting events

Response

202
application/json

Successfully accepted to process all the events from payload.

The response is of type object.