The endpoints that are in active use doesnât support API keys. However, thereâs a set of API-key compatible endpoints that I never finished porting over to. So, with the caveats that:
- This isnât in active use in groov View and may bit-rot at some point.
- This isnât considered documented or stable so could change in any release.
You can get the list of all events in the system with their current states by using api/v0/events
and you can target a particular event by using api/v0/events/:event-id
where :event-id
is an integer. You can get the event ids from that first endpoint.
So if youâre using groov Server for Windows, an AT1, or an AR1, you can use:
https://your-groov-address/api/v0/events?api_key=YOUR_API_KEY
https://your-groov-address/api/v0/events/:event-id?api_key=YOUR_API_KEY
And on EPIC, itâs:
https://your-epic-address/view/api/v0/events?api_key=YOUR_API_KEY
https://your-epic-address/view/api/v0/events/:event-id?api_key=YOUR_API_KEY
The output from the second form looks like this at the moment:
{
"id": 92,
"name": "Vegas 22010",
"enabled": true,
"condition": {
"children": [
{
"children": [
{
"type": "compare",
"comparator": ">=",
"tag_id": 158,
"tag_index": 0,
"tag_count": 1,
"bit_index": -1,
"value": 75,
"hysteresis": 0,
"debounce_time": 1
},
{
"type": "compare",
"comparator": "<=",
"tag_id": 158,
"tag_index": 0,
"tag_count": 1,
"bit_index": -1,
"value": 90,
"hysteresis": 0,
"debounce_time": 1
}
],
"type": "and"
}
],
"type": "or"
},
"sendEmailOnBegin": false,
"sendEmailOnEnd": false,
"beginEmail": {
"subject": "Vegas, baby.",
"body": "Seems like a nice day in Vegas, at {{tag(158,0,1)}}ÂșF."
},
"endEmail": {
"subject": "Avoid Vegas, baby.",
"body": "The weather's gross in Vegas now at {{tag(158,0,1)}}ÂșF."
},
"recipients": {
"users": [],
"groups": [],
"everyone": false
},
"state": "INACTIVE",
"errors": [
{
"tag": {
"tagId": 158,
"tableStart": 0,
"tableCount": 1,
"bit": -1
},
"errorCode": "CONTROLLER_CANNOT_CONNECT",
"errorString": "Waiting 29.1 seconds until trying to reconnect to device ControlEngine-jfischer-lx.opto22.com:22010."
}
]
}
The output from the first form (all events) will be an array of those entries.