Skip to main content

Log Events

POST /events

Add events to the event store. When process_user_actions=true new events will trigger updates to user action recommendations and label weights.

Request Parameters

Query Parameters

NameTypeDescription
queue_updatesboolean

Default: False
- true (default): Process user updates in the background, very fast response (ack) - false: Process user updates and produce new action recommendations immediately, slightly longer response time, guaranteed user update.

process_user_actionsboolean

Default: True
- true (default): Process updated action recommendations for event users. Use this option for real-time event logging and action feedback - false: Do not process updated action recommendations for event users. Use this option for bulk loading or back-filling a large number of events.

Header Parameters

NameTypeDescription
program-id requiredstring

Request Body

EventList | application/json

NameTypeProperties
events requiredarray

items: {'$ref': '#/components/schemas/Event'}
description: Array of events, from a minimum of 1 event to maximum of 1000 events

Event | application/json

NameTypeProperties
user_id requiredstring
event_timestamp requiredstring

description: Time the event occurred in ISO 8601 format
format: date-time

event_type requiredstring
asset_id requiredstring
labels requiredarray

items: {}
description: Array of labels associated with an instance of the event. These should not be used as asset labels which should be managed separately.

Request Example

{
"events": [
{
"user_id": "string",
"event_timestamp": "string",
"event_type": "string",
"asset_id": "string",
"labels": "array"
}
]
}

Responses

200 Successful Response

SuccessMessage | application/json

NameTypeProperties
result requiredstring

Response Example

{
"result": "string"
}

422 Validation Error

HTTPValidationError | application/json

NameTypeProperties
detailarray

items: {'$ref': '#/components/schemas/ValidationError'}

ValidationError | application/json

NameTypeProperties
loc requiredarray

items: {'anyOf': [{'type': 'string'}, {'type': 'integer'}]}

msg requiredstring
type requiredstring