Appearance
Events API
You can use the events API to insert events into Almeta ML from any source. Events are used to train machine learning models and to make predictions.
Insert an Event
- Method: POST
- Path:
/ml/events
- Description: Inserts an event into the system.
- Request Body:
Property | Type | Description |
---|---|---|
customer_id | String | The ID of the customer associated with the event |
name | String | The name of the event |
data | String | The data of the event as an object (optional) |
metadata | String | The metadata of the event (optional) |
user_agent | String | The user agent of the customer (optional) |
context | String | The context of the event (optional) |
is_bot | Boolean | Whether the customer likely is a bot (optional) |
geo | Object | The geolocation of the customer (optional) |
The data
property needs to have a correct event format for the corresponding event name. Refer to the event documentation for more information.
The metadata
property is an object that can contain any additional information about the event.
The geo
object has the following properties:
Property | Type | Description |
---|---|---|
timezone | String | The timezone of the customer (optional) |
continent | String | The continent of the customer (optional) |
country | String | The country of the customer (optional) |
postal_code | String | The postal code of the customer (optional) |
region | String | The region of the customer (optional) |
region_code | String | The region code of the customer (optional) |
city | String | The city of the customer (optional) |
latitude | String | The latitude of the customer (optional) |
longtitude | String | The longtitude of the customer (optional) |
is_in_eu | Boolean | Whether the customer is in the EU (optional) |