Skip to main content

Register an Event Schema

Via Web App​

Go to Event Schemas Overview click Event Schema create button. Choose the event name, add the necessary properties, then Event Schema create button 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​

AttributeRequiredDescription
aliasYesUnique ID for the schema.
titleYesHuman readable title.
descriptionNoOptional description.
requiredNoAn array of required fields. For example, ["cartId", "productName"]. Empty by default.
propertiesYesAn object manifests this event's properties. For example: { "cartId": {...}, "productName": {....} } more details below.
conversionNoWhether this object is a conversion event, default o
isPublishYesCurrent must be set to true.
tagsNoAn array of tag string, purely for the sake of convenience of the web app.

properties attributes​

AttributeRequiredDescription
typeYesAvailable values: boolean, number, string, array.
aliasYesUnique ID for the properties per this event schema. Currently it should match the property key specified from the outer event schema.
titleYesHuman readable title.
descriptionNoOptional property description.