Register an Event Schema
Via Web App​
Go to Event Schemas Overview click . Choose the event name, add the necessary properties, then it.
Once done, you can try to Send Events
Via API​
The endpoint: https://dev.primedata.ai/v1/chiron/events.
Firstly, about authorization​
This endpoint belongs to App API, its authorization here runs a totally different scheme with the Event Push API (See Overview). It uses a different single JWT token (APP_API_TOKEN
on the below example).
As of now, to acquire one, contact huy.le@primedata.ai.
Example:
$ curl -X POST https://dev.primedata.ai/v1/chiron/events \
-H 'Authorization: Bearer ${APP_API_TOKEN}' \
-d '{
"alias": "an-event-id",
"title": "My Event",
"isPublish": true,
"properties": {
"anProperty": {
"type": "boolean",
"alias": "anProperty",
"title": "An Property"
},
"anotherProperty": {
"type": "string",
"alias": "anProperty",
"title": "An Property"
},
}
}' \
-D -
JSON body attributes​
Attribute | Required | Description |
---|---|---|
alias | Yes | Unique ID for the schema. |
title | Yes | Human readable title. |
description | No | Optional description. |
required | No | An array of required fields. For example, ["cartId", "productName"] . Empty by default. |
properties | Yes | An object manifests this event's properties. For example: { "cartId": {...}, "productName": {....} } more details below. |
conversion | No | Whether this object is a conversion event, default o |
isPublish | Yes | Current must be set to true . |
tags | No | An array of tag string, purely for the sake of convenience of the web app. |
properties
attributes​
Attribute | Required | Description |
---|---|---|
type | Yes | Available values: boolean , number , string , array . |
alias | Yes | Unique ID for the properties per this event schema. Currently it should match the property key specified from the outer event schema. |
title | Yes | Human readable title. |
description | No | Optional property description. |