I noticed that when running this command
curl "http://server/zm/api/events/consoleEvents/1%20hour.json" you get a list of events for cameras in the last hour, that are not zero. That is, if events exist, then you get the monitor ID, and the # of events. Howver, if events are zero for a camera, you get no entry for this in the report. This may be incorrect, so I'd like to draw it to attention here.
The official API docs have a section on returning a list of events for all monitors within a given time range. The next section goes on to explain how you can use the handy mechanism to report events per monitor in the last hour.
This is not a significant problem. I can work around it as it is, however maybe it should be adjusted so that if a monitor exists in the DB, yet has zero events, it returns the monitor ID and an entry of "0" for the # of events in the last hour.
Response when all cameras have events:
Code: Select all
{
"results": {
"1": "6",
"2": "6",
"3": "6",
"4": "6",
"5": "6",
"6": "6",
}
}
Code: Select all
{
"results": {
"1": "6",
"2": "6",
"3": "6",
"5": "6",
"6": "6",
}
}