-
Notifications
You must be signed in to change notification settings - Fork 0
External Events Recording API
martinkonopka edited this page Apr 23, 2018
·
4 revisions
This API is available during the session recording and only if External Events (EXTEV) device was included in the session definition.
-
system
: string - name of the application sending the event. -
name
: string - name of the event. -
data
: JSON object (optional) - data specifying the event. -
timestamp
: long (optional) - timestamp when the event occurred in milliseconds from the epoch (01/01/1970 00:00:00). If not specified, timestamp when the event was received by the UXC is used. -
validTill
: long (optional) - timestamp of the end of validity of the event.
POST /api/event/
Records new external event.
- Parameters: None.
- Body: ExternalEvent
Empty.
$ curl -X POST \
-H 'Content-Type: application/json' \
--data '{ /* External Event JSON */ }' \
http://localhost:55555/api/event
Equivalent with jQuery, enable cross domain request:
function sendEvent(system, name, timestamp, data) {
// construct external event object
var event = {
system: system,
name: name,
timestamp: timestamp,
data: data
};
$.ajax({
type: "POST",
url: "http://localhost:55555/api/event",
data: JSON.stringify(event),
crossDomain: true,
contentType:"application/json; charset=utf-8",
success: function () {
// event successfully sent
},
error: function (error) {
// failed to send event
}
});
POST /api/event/many
Records array of external events.
- Parameters: None.
- Body: ExternalEvent[] - array of external events.
Empty.
$ curl -X POST \
-H 'Content-Type: application/json' \
--data '[ { /* External Event JSON */ }, ... ]' \
http://localhost:55555/api/event/many
- Home
- Usage Examples
- User Manual
- API Reference
- Installation Manual
- Contributing
- Project Documentation