Events
An event will sometimes be created by your OpenDrives system in response to conditions on your system
Basic Operations
We support listing, reading, and destroying events.
List Events
List all the events on your system
Request Object
+ URL /api/v2/event/ + Method GET + Headers Content-Type: application/json token: ThisIsNotARealTokenGenerateYourOwnToken + Body {}
Response Object
You should get back an array of events.
+ Headers X-Powered-By: OpenDrives Access-Control-Allow-Origin: * Content-Type: application/json; charset=utf-8 + Body [{ "id": 1, "hostid": "811fea00", "type": "capacity", "severity": 7, "json": { "data": { "name": "rpool/ROOT/OpenDrives-quartz-2.1.8", "used": 5980549120, "avail": 101832052736, "total": 107812601856, "percent": 5 }, "type": "capacity", "message": "(buffy.openlab.com) File System [rpool/ROOT/OpenDrives-quartz-2.1.8] is above 5% capacity.", "severity": 7, "event_class": "fs_usage" }, "raw": "Event thrown by Atlas System Monitoring Tool", "hash": "b42f9386-c879-ccbe-ac87-79f336769428", "unix_time": "1597001521411", "createdAt": "2020-08-09T19:32:01.413Z", "updatedAt": "2020-08-09T19:32:01.413Z" }, { "id": 2, "hostid": "811fea00", "type": "capacity", "severity": 7, "json": { "data": { "name": "rpool/ROOT", "used": 5986222080, "avail": 101826371584, "total": 107812593664, "percent": 5 }, "type": "capacity", "message": "(buffy.openlab.com) File System [rpool/ROOT] is above 5% capacity.", "severity": 7, "event_class": "fs_usage" }, "raw": "Event thrown by Atlas System Monitoring Tool", "hash": "4c2dadf7-911e-54c0-0443-fac050297296", "unix_time": "1597001522360", "createdAt": "2020-08-09T19:32:02.361Z", "updatedAt": "2020-08-09T19:32:02.361Z" } ]
Get an Event
As usual, you can get the details of just one event if you wish.
Request Object
+ URL /api/v2/event/$EVENT_ID/details + Method GET + Parameters event id (string, required, URL Param) - the id of the event to view + Headers Content-Type: application/json token: ThisIsNotARealTokenGenerateYourOwnToken + Body {}
Response Object
You should get back an array of just your event.
+ Headers X-Powered-By: OpenDrives Access-Control-Allow-Origin: * Content-Type: application/json; charset=utf-8 + Body [{ "id": 1, "hostid": "811fea00", "type": "capacity", "severity": 7, "json": { "data": { "name": "rpool/ROOT/OpenDrives-quartz-2.1.8", "used": 5980549120, "avail": 101832052736, "total": 107812601856, "percent": 5 }, "type": "capacity", "message": "(buffy.openlab.com) File System [rpool/ROOT/OpenDrives-quartz-2.1.8] is above 5% capacity.", "severity": 7, "event_class": "fs_usage" }, "raw": "Event thrown by Atlas System Monitoring Tool", "hash": "b42f9386-c879-ccbe-ac87-79f336769428", "unix_time": "1597001521411", "createdAt": "2020-08-09T19:32:01.413Z", "updatedAt": "2020-08-09T19:32:01.413Z" }]
Destroy an Event
You may clear an event from your system that you no longer wish to have on record.