Send events
After filling the required values in the previous section, we can start sending actor’s generated events via Manufactory agent.
Required keys
--actor
(required) object - Pairs containing attribute name and the corresponding value while considering the correct attribute names and data types. Please refer to Get Actors schema .--event
(required) object - Pairs containing attribute name and the corresponding value while considering the correct attribute names and data types. Please refer to Get events schema .
Actor example
{
"city": "New York",
"country": "USA",
"username": "john.doe",
"email": "john.doe@email.com"
}
Event example
{
"event_name": "login",
"event_type": "user-actions",
"made_purchase": false
}
Before we pass actor and event objects, we need to encode the objects using base64.
Agent example
manufactory-agent --actor=ewogICAgImNpdHkiOiAiTmV3I \
--event=ewogICAgImV2ZW50X25hbWUiO==
The agent will handle the authentication and sending events, then it will shut down.
Related articles
Collecting events via REST API > Send events
The endpoint POST /events
allows sending actor profiles with the required keys of org_id
, project_id
, actor_profile
, and attributes
, considering the correct attribute names and data types from the corresponding schemas.
Collecting Events via Websocket > Send events
Web socket connections enable sending user-generated events with specific attributes via an open channel.
Manufactory > Collector
The collector allows sending actor data and events for viewing in a custom interface, with ingestion possible via REST API, websocket, or CLI agent after creating actor and event schemas.
Events > Create events schema
The API endpoint creates an events schema by specifying the required attributes and their corresponding data types for a given project in a Manufactory organization.