Cluster API Events
Cluster API documentation for events
Deprecated since version 1.44.0: This API is now provided by the SDK.
Events
- GET /eventsdefs
Get the events
- Response JSON Object:
[key].maps[] (object) –
[key].maps[].id (string) –
[key].maps[].key[] (string) –
[key].maps[].source (string) –
[key].maps[].value (undefined) –
[key].maps[].where.key[] (string) –
[key].maps[].where.name (string) –
[key].maps[].where.type (string) –
[key].maps[].where.$in[] (undefined) –
[key].maps[].where.$search (string) –
[key].maps[].where.$searchIn[] (string) –
[key].maps[].where.$caseSensitive (boolean) –
[key].maps[].where.$eq (undefined) –
[key].maps[].where.$neq (undefined) –
[key].maps[].where.$gt (undefined) –
[key].maps[].where.$gte (undefined) –
[key].maps[].where.$lt (undefined) –
[key].maps[].where.$lte (undefined) –
[key].maps[].where.$or (undefined) –
[key].maps[].where.$and (undefined) –
[key].reductions[] (object) –
[key].reductions[].id (string) –
[key].reductions[].key[] (string) –
[key].reductions[].period (integer) –
[key].reductions[].value[] (string) –
[key].reductions[].where.key[] (string) –
[key].reductions[].where.name (string) –
[key].reductions[].where.type (string) –
[key].reductions[].where.$in[] (undefined) –
[key].reductions[].where.$search (string) –
[key].reductions[].where.$searchIn[] (string) –
[key].reductions[].where.$caseSensitive (boolean) –
[key].reductions[].where.$eq (undefined) –
[key].reductions[].where.$neq (undefined) –
[key].reductions[].where.$gt (undefined) –
[key].reductions[].where.$gte (undefined) –
[key].reductions[].where.$lt (undefined) –
[key].reductions[].where.$lte (undefined) –
[key].reductions[].where.$or (undefined) –
[key].reductions[].where.$and (undefined) –
[key].reductions[].publishers[] (string) –
Example response:
{ "game": { "maps": [ { "value": 1, "id": "cheer", "where": { "type": "string", "name": "<name>", "key": [ "cheer" ] }, "source": "userinput", "key": [ "cheer", "<name>" ] } ], "reductions": [ { "id": "cheer", "period": 250, "where": { "key": [ "cheer", "<name>" ] }, "value": [ "$sum" ], "key": [ "<name>" ] } ] } }
- POST /eventsdefs
Set the events
- Request JSON Object:
[key].maps[] (object) –
[key].maps[].id (string) –
[key].maps[].key[] (string) –
[key].maps[].source (string) –
[key].maps[].value (undefined) –
[key].maps[].where.key[] (string) –
[key].maps[].where.name (string) –
[key].maps[].where.type (string) –
[key].maps[].where.$in[] (undefined) –
[key].maps[].where.$search (string) –
[key].maps[].where.$searchIn[] (string) –
[key].maps[].where.$caseSensitive (boolean) –
[key].maps[].where.$eq (undefined) –
[key].maps[].where.$neq (undefined) –
[key].maps[].where.$gt (undefined) –
[key].maps[].where.$gte (undefined) –
[key].maps[].where.$lt (undefined) –
[key].maps[].where.$lte (undefined) –
[key].maps[].where.$or (undefined) –
[key].maps[].where.$and (undefined) –
[key].reductions[] (object) –
[key].reductions[].id (string) –
[key].reductions[].key[] (string) –
[key].reductions[].period (integer) –
[key].reductions[].value[] (string) –
[key].reductions[].where.key[] (string) –
[key].reductions[].where.name (string) –
[key].reductions[].where.type (string) –
[key].reductions[].where.$in[] (undefined) –
[key].reductions[].where.$search (string) –
[key].reductions[].where.$searchIn[] (string) –
[key].reductions[].where.$caseSensitive (boolean) –
[key].reductions[].where.$eq (undefined) –
[key].reductions[].where.$neq (undefined) –
[key].reductions[].where.$gt (undefined) –
[key].reductions[].where.$gte (undefined) –
[key].reductions[].where.$lt (undefined) –
[key].reductions[].where.$lte (undefined) –
[key].reductions[].where.$or (undefined) –
[key].reductions[].where.$and (undefined) –
[key].reductions[].publishers[] (string) –
Example query:
{ "game": { "maps": [ { "value": 1, "id": "cheer", "where": { "type": "string", "name": "<name>", "key": [ "cheer" ] }, "source": "userinput", "key": [ "cheer", "<name>" ] } ], "reductions": [ { "id": "cheer", "period": 250, "where": { "key": [ "cheer", "<name>" ] }, "value": [ "$sum" ], "key": [ "<name>" ] } ] } }
- DELETE /eventsdefs
Delete all events
- DELETE /eventsdefs/{events_id}
Delete an event given its ID
- Parameters:
events_id – The event’s id
- GET /eventsdefs/{events_id}
Get an event given its ID
- Parameters:
events_id – The event’s id
- Response JSON Object:
maps[] (object) –
maps[].id (string) –
maps[].key[] (string) –
maps[].source (string) –
maps[].value (undefined) –
maps[].where.key[] (string) –
maps[].where.name (string) –
maps[].where.type (string) –
maps[].where.$in[] (undefined) –
maps[].where.$search (string) –
maps[].where.$searchIn[] (string) –
maps[].where.$caseSensitive (boolean) –
maps[].where.$eq (undefined) –
maps[].where.$neq (undefined) –
maps[].where.$gt (undefined) –
maps[].where.$gte (undefined) –
maps[].where.$lt (undefined) –
maps[].where.$lte (undefined) –
maps[].where.$or (undefined) –
maps[].where.$and (undefined) –
reductions[] (object) –
reductions[].id (string) –
reductions[].key[] (string) –
reductions[].period (integer) –
reductions[].value[] (string) –
reductions[].where.key[] (string) –
reductions[].where.name (string) –
reductions[].where.type (string) –
reductions[].where.$in[] (undefined) –
reductions[].where.$search (string) –
reductions[].where.$searchIn[] (string) –
reductions[].where.$caseSensitive (boolean) –
reductions[].where.$eq (undefined) –
reductions[].where.$neq (undefined) –
reductions[].where.$gt (undefined) –
reductions[].where.$gte (undefined) –
reductions[].where.$lt (undefined) –
reductions[].where.$lte (undefined) –
reductions[].where.$or (undefined) –
reductions[].where.$and (undefined) –
reductions[].publishers[] (string) –
Example response:
{ "maps": [ { "value": 1, "id": "cheer", "where": { "type": "string", "name": "<name>", "key": [ "cheer" ] }, "source": "userinput", "key": [ "cheer", "<name>" ] } ], "reductions": [ { "id": "cheer", "period": 250, "where": { "key": [ "cheer", "<name>" ] }, "value": [ "$sum" ], "key": [ "<name>" ] } ] }
- POST /eventsdefs/{events_id}
Create an event
- Request JSON Object:
maps[] (object) –
maps[].id (string) –
maps[].key[] (string) –
maps[].source (string) –
maps[].value (undefined) –
maps[].where.key[] (string) –
maps[].where.name (string) –
maps[].where.type (string) –
maps[].where.$in[] (undefined) –
maps[].where.$search (string) –
maps[].where.$searchIn[] (string) –
maps[].where.$caseSensitive (boolean) –
maps[].where.$eq (undefined) –
maps[].where.$neq (undefined) –
maps[].where.$gt (undefined) –
maps[].where.$gte (undefined) –
maps[].where.$lt (undefined) –
maps[].where.$lte (undefined) –
maps[].where.$or (undefined) –
maps[].where.$and (undefined) –
reductions[] (object) –
reductions[].id (string) –
reductions[].key[] (string) –
reductions[].period (integer) –
reductions[].value[] (string) –
reductions[].where.key[] (string) –
reductions[].where.name (string) –
reductions[].where.type (string) –
reductions[].where.$in[] (undefined) –
reductions[].where.$search (string) –
reductions[].where.$searchIn[] (string) –
reductions[].where.$caseSensitive (boolean) –
reductions[].where.$eq (undefined) –
reductions[].where.$neq (undefined) –
reductions[].where.$gt (undefined) –
reductions[].where.$gte (undefined) –
reductions[].where.$lt (undefined) –
reductions[].where.$lte (undefined) –
reductions[].where.$or (undefined) –
reductions[].where.$and (undefined) –
reductions[].publishers[] (string) –
- Parameters:
events_id – The event’s id
Example query:
{ "maps": [ { "value": 1, "id": "cheer", "where": { "type": "string", "name": "<name>", "key": [ "cheer" ] }, "source": "userinput", "key": [ "cheer", "<name>" ] } ], "reductions": [ { "id": "cheer", "period": 250, "where": { "key": [ "cheer", "<name>" ] }, "value": [ "$sum" ], "key": [ "<name>" ] } ] }
- GET /events/results/{counter}
Get a log of events results. This request can be used in a pull request to show a events log. The log is reset when there are no requests for 5 seconds.
- Parameters:
counter – Position of the log
- Response JSON Object:
counter (integer) – The position at the end of the log..
messages[] (object) – A list of events results messages.
messages[].error (string) – An error if any.
messages[].value (string) – A log value.
Example response:
{ "counter": 0, "messages": [ { "error": "", "value": "" } ] }
- GET /events/summaries
Get the collection of each event’s summary
- Response JSON Object:
[] (object) – A collection of summaries of the events.
[].id (string) – The name of the event.
[].results[] (object) – A list of keys defined by the event and the result values of each.
[].results[].key[] (string) – An array of strings forming the key
[].results[].value.min (number) – The minimum value among all inputs.
[].results[].value.max (number) – The maximum value among all inputs.
[].results[].value.count (number) – The number of times the key was encountered.
[].results[].value.sum (number) – The sum of all input values added together.
[].start (string) – The start time of the event.
[].last (string) – The last time the event was updated.
Example response:
[ { "id": "cheer", "results": [ { "key": [ "Porthos" ], "value": { "min": 1, "max": 1, "count": 9, "sum": 9 } }, { "key": [ "Athos" ], "value": { "min": 1, "max": 1, "count": 4, "sum": 4 } }, { "key": [ "Aramis" ], "value": { "min": 1, "max": 1, "count": 10, "sum": 10 } } ], "start": "2018-07-24T12:24:15.8949179-04:00", "last": "2018-07-24T12:32:20.3956734-04:00" }, { "id": "changeColor", "results": [ { "key": [ "Aramis", "purple" ], "value": { "min": 1, "max": 1, "count": 1, "sum": 1 } }, { "key": [ "Athos", "orange" ], "value": { "min": 1, "max": 1, "count": 1, "sum": 1 } }, { "key": [ "Porthos", "blue" ], "value": { "min": 1, "max": 1, "count": 1, "sum": 1 } } ], "start": "2018-07-24T12:24:15.8949179-04:00", "last": "2018-07-24T12:32:20.3956734-04:00" } ]
- DELETE /events/summaries
Clear the summaries of events