Files
zoneminder/web/api
SteveGilvarry 18011e3e62 fix: make monitors API index portable under ONLY_FULL_GROUP_BY
The monitors index unconditionally LEFT JOINed Groups_Monitors and collapsed
the duplicate rows (monitors in multiple groups) with GROUP BY `Monitor`.`Id`.
That GROUP BY fails under ONLY_FULL_GROUP_BY on engines without functional
dependency detection (MariaDB), raising 1055 'Monitor.Name isn't in GROUP BY',
so /api/monitors.json returned a 500 while /api/monitors/<id>.json worked.

Only join Groups_Monitors when the request filters by group (matching the
existing EventsController pattern and the original commented-out intent), drop
the GROUP BY, and dedupe by monitor Id in the existing result loop to cover
multi-value GroupId filters. Portable across MySQL and MariaDB.

refs #3633
2026-06-14 00:18:26 +10:00
..
2021-03-31 12:11:12 -04:00
2021-03-31 12:11:12 -04:00
2021-03-31 12:11:12 -04:00
2017-05-03 12:35:54 -05:00
2021-03-31 12:11:12 -04:00
2021-03-31 12:11:12 -04:00
2023-08-27 02:00:59 +02:00

ZoneMinder API

This is the ZoneMinder API. It should be, for now, installed under the webroot e.g. /api.

app/Config/database.php.default must be configured and copied to app/Config/database.php

In addition, Security.salt and Security.cipherSeed in app/Config/core.php should be changed.

The API can run on a dedicated / separate instance, so long as it can access the database as configured in app/Config/database.php