GET
/
events
curl --request GET \
  --url https://api.togai.com/events \
  --header 'Authorization: Bearer <token>'
{
  "events": [
    {
      "eventPayload": {
        "timestamp": "2023-02-23T14:25:10Z",
        "schemaName": "travelCompletedEvent",
        "id": "c0b1306d-f506-43a6-856b-69221efaee6b",
        "referenceId": "event.dsvhk32.234n3",
        "accountId": "1",
        "attributes": [
          {
            "name": "distanceTravelled",
            "value": "50",
            "unit": "Miles"
          },
          {
            "name": "timeSpent",
            "value": "60",
            "unit": "Minutes"
          }
        ],
        "dimensions": {
          "location": "Seattle",
          "costCenterCode": "1234",
          "travelType": "Business"
        }
      },
      "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"
    },
    {
      "eventPayload": {
        "timestamp": "2023-02-23T14:25:10Z",
        "schemaName": "sendMessageEvent",
        "referenceId": "event.dsvhk32.234n4",
        "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"
        }
      },
      "ingestionStatus": {
        "status": "INGESTION_COMPLETED_EVENT_METERED",
        "statusDescription": "Ingestion completed successfully"
      },
      "createdAt": "2021-03-04T14:25:10Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Query Parameters

nextToken
string

Pagination token used as a marker to get records from next page.

Example:

"eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEyMywgInNvcnRPcmRlciI6ICJhc2MifQ=="

status
string

Filter option to filter by status.

account_id
string

Filter option to filter based on account id.

Example:

"1234"

schema_name
string

Filter option to filter the events based on schema name.

Example:

"Rides"

pageSize
integer

Maximum page size expected by client to return the record list.

NOTE: Max page size cannot be more than 50. Also 50 is the default page size if no value is provided.

Example:

10

Response

200
application/json
Success response

Get batch events response

events
object[]
required

Raw usage event ingested by the business team and the status of the event ingestion.

nextToken
string
Maximum length: 500
Example:

"eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEyMywgInNvcnRPcmRlciI6ICJhc2MifQ=="