User Event Format v0.6¶
The following JSON object is representative of the message to be sent:
1{
2 id: "<SHA-1>",
3 occurredMillis: 1321020852,
4 receivedMillis: 1321020852,
5 userID: "administrator@admin.grnet.gr",
6 clientID: "platform-wide-unique-ID",
7 eventType: "modify",
8 isActive: true,
9 role: "student",
10 eventVersion: "1.0",
11 details: {
12 keyA: "value1",
13 keyB: "value2",
14 }
15}
The JSON string must be encoded in UTF-8.
The meaning of the fields above is as follows:
- id A client-wide unique string. This is needed in order to trace messages across the systems. Preferably a SHA-1.
- occurredMillis The timestamp at the event creation time. This is Unix epoch time.
- receivedMillis As far as clients are concerned, set this equal to occurredMillis.
- userID The ID of the user for which this event is relevant.
- clientID An Okeanos-wide unique string, naming the client that makes the request.
- eventType A string indicating the type of the event. Possible types are:
- create
- modify
- isActive A boolean value indicating whether the user is active.
- role A string indicating the role of the user.
- eventVersion Set this to "1.0" for now.
- details: A map/dictionary indicating extra metadata for this resource event. A few requirements:
- The dictionary must always be present, even if it is empty.
- The keys must be made of the following class of characters: [_a-zA-Z ].
- The values must always be strings even if semantically they are something else (e.g. numbers).
- For dates, use Unix time in milliseconds.
- All dictionary keys starting with __aquarium are reserved for Aquarium internal use and must not be present in events sent by other systems.