ServerChangedv1.0.0
Details
This event must be consumed using an authorization token. The token is utilized to verify that the user has permission to produce the event and set user_id and organization_id within the attributes. Additionally, the event_source and metadata.event_triggered_by are automatically populated by the CF-Worker-User-Event.
- The student change servers manually
- The student change servers by automatic trigger
- event_type: 'server_changed'
- event_name: 'platzi.material_progress.1.server_changed'
- attributes.key: 'serverID' from ['serverA', 'serverB', 'serverC', 'serverM', 'serverP']
- attributes.value: 'currentTime' from player (seconds)
- metadata.source: 'new_platzi' or 'legacy_platzi' explanation: Used to identify origins in the same user agent but with different behavior orchestrated by AB testing.
- metadata.course_id: 'courseId' from material object
- metadata.material_id: 'materialId' from material object
- metadata.event_type: 'eventType' from ['waiting', 'manual', 'error:-2', 'error:1', 'error:2', 'error:4']
- metadata.previous_server: 'previousServerId'
Id for the event. This is a client auto-generated UUID_V4
Name of the event with format organization.domain.version.action
DateTime when the event was raises. Format YYYY-MM-DDTHH:MM:SSz
Contains arbitrary properties with entity information
Server id (the students switched to), for example serverC or serverD
Position as seconds
Contain fixed properties with event information
source agent (on the web there are two for the materialized view, for example)
Course identifier
Material identifier
Type of de action: waiting or error type (verbose name) that invoke trigger automatic
Server id, for example serverC
How to trigger this event
1curl --location 'https://api-c963080767f45828c31f83ca5cd25d36.staging.platzi.com/behavior/v1/' \
2--header 'Content-Type: application/json' \
3--data '{
4 "event_id": "2457207d-a9d8-4b46-aff3-2a8ca385f2f6",
5 "event_name": "platzi.material_progress.1.server_changed",
6 "event_occurred_on": "2023-05-01T22:29:56Z",
7 "attributes": {
8 "key": "serverM",
9 "value": "90"
10 },
11 "metadata": {
12 "source": "new_platzi",
13 "course_id": 1,
14 "material_id": 1,
15 "event_type": "waiting",
16 "previous_server": "serverC"
17 }
18}'
19