Skip to main content
GET
/
event_schema
/
{event_schema_name}
Get an event schema
curl --request GET \
  --url https://api.togai.com/event_schema/{event_schema_name} \
  --header 'Authorization: Bearer <token>'
{
  "name": "<string>",
  "version": 1,
  "description": "<string>",
  "status": "DRAFT",
  "attributes": [
    {
      "name": "distance",
      "defaultUnit": "kms"
    }
  ],
  "dimensions": [
    {
      "name": "city"
    }
  ],
  "filterFields": [
    "<string>"
  ],
  "featureDetails": {
    "featureId": "<string>",
    "attributeName": "<string>"
  },
  "enrichments": {
    "fields": [
      {
        "name": "<string>",
        "type": "ATTRIBUTE",
        "enrichmentType": "VALUE",
        "value": "<string>",
        "order": 123
      }
    ],
    "dependencies": [
      {
        "type": "SETTING",
        "key": "<string>",
        "name": "<string>"
      }
    ]
  },
  "eventIdTemplate": "<string>",
  "eventLevelRevenue": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

event_schema_name
string
required
Maximum string length: 50
Example:

"rides"

Query Parameters

version
integer<int32>

Optional version to get a specific version. Gets latest version if it is not provided.

Example:

2

Response

Response for Create and Get event schema requests

Structure of an event schema

name
string
required

Name of the event. Must be unique for an organization.

Maximum string length: 50
version
integer<int32>
required

Version of event schema

Required range: x >= 1
Example:

1

description
string

Description of the event

Maximum string length: 255
status
enum<string>

Status of event schema

  • DRAFT - Schema is in draft state
  • ACTIVE - Schema is currently active
  • INACTIVE - Schema is currently inactive
  • ARCHIVED - Older version of event schema
Available options:
DRAFT,
ACTIVE,
INACTIVE,
ARCHIVED
Example:

"DRAFT"

attributes
object[]
Maximum array length: 50
dimensions
object[]
Maximum array length: 50
filterFields
string[]
featureDetails
object

details of feature associated with event schema with attribute name

enrichments
object
eventIdTemplate
string

Template used to generate event id based on event payload

eventLevelRevenue
boolean
createdAt
string<date-time>
updatedAt
string<date-time>