From 13feb968111a14c7fa9eabda64e4d59dcaedd8dd Mon Sep 17 00:00:00 2001 From: arjunrc Date: Thu, 19 May 2016 15:06:41 -0400 Subject: [PATCH 1/2] added alarm apis --- docs/api.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/api.rst b/docs/api.rst index 53c6d155b..e4e7bb1ee 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -130,6 +130,28 @@ depend on it. curl -XDELETE http://server/zm/api/monitors/1.json +Arm/Disarm monitors +^^^^^^^^^^^^^^^^^^^^ + +This command will force an alarm on Monitor 1: + +:: + + curl http://server/zm/api/monitors/alarm/id:1/command:on.json + +This command will disable the alarm on Monitor 1: + +:: + + curl http://server/zm/api/monitors/alarm/id:1/command:off.json + +This command will report the status of the alarm Monitor 1: + +:: + + curl http://server/zm/api/monitors/alarm/id:1/command:status.json + + Return a list of all events ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From e0c5b2a78ff85dc3d8ce99619e027d0a59565b06 Mon Sep 17 00:00:00 2001 From: arjunrc Date: Thu, 19 May 2016 15:15:48 -0400 Subject: [PATCH 2/2] added consoleEvents API --- docs/api.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/api.rst b/docs/api.rst index e4e7bb1ee..9546a279a 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -238,6 +238,26 @@ Return a list of events for all monitors within a specified date/time range curl -XGET "http://server/zm/api/events/index/StartTime%20>=:2015-05-15%2018:43:56/EndTime%20<=:208:43:56.json" +Return event count based on times and conditions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The API also supports a handy mechanism to return a count of events for a period of time. + +This returns number of events per monitor that were recorded in the last one hour + +:: + + curl "http://server/zm/api/events/consoleEvents/1%20hour.json" + +This returns number of events per monitor that were recorded in the last day where there were atleast 10 frames that were alarms" + +:: + + curl "http://server/zm/api/events/consoleEvents/1%20day.json/AlarmFrames >=: 10.json" + + + + Configuration Apis ^^^^^^^^^^^^^^^^^^^