GET
/
events
curl --request GET \
  --url https://api.togai.com/events \
  --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"
        }
      },
      "ingestionStatus": {
        "status": "INGESTION_COMPLETED_EVENT_NOT_BILLED",
        "statusDescription": "Event ingestion completed successfully but the event is not associated with any bill plan."
      }
    },
    {
      "eventPayload": {
        "timestamp": "2023-02-23T14:25:10Z",
        "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"
        }
      },
      "ingestionStatus": {
        "status": "INGESTION_COMPLETED",
        "statusDescription": "Ingestion completed successfully"
      }
    }
  ]
}

Authorizations

Authorization
string
headerrequired

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.

status
string

Filter option to filter by status.

account_id
string

Filter option to filter based on account id.

schema_name
string

Filter option to filter the events based on schema name.

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.

Response

200 - application/json
events
object[]
required
nextToken
string