api/events/index/MonitorId:1.json "limit" query parameter no longer works in recent versions (and VNC monitor problems)

Current Development version likely to have breaking changes
Post Reply
MarsRover
Posts: 49
Joined: Sat Apr 30, 2022 10:34 am

api/events/index/MonitorId:1.json "limit" query parameter no longer works in recent versions (and VNC monitor problems)

Post by MarsRover »

Hello
Starting from 1.37.66~20250612.323-focal call to

Code: Select all

api/events/index/MonitorId:1.json?sort=StartDateTime&direction=desc&limit=1
disregards `limit` query parameter and returns all events (which might take a while).

Code: Select all

5.15.0-139-generic #149~20.04.1-Ubuntu SMP Wed Apr 16 08:29:56 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Last edited by MarsRover on Sat Jun 21, 2025 12:32 am, edited 1 time in total.
MarsRover
Posts: 49
Joined: Sat Apr 30, 2022 10:34 am

Re: api/events/index/MonitorId:1.json "limit" query parameter no longer works in recent versions

Post by MarsRover »

VNC monitors are also affected.
Had to downgrade to 1.37.66~20250520.297-focal, all higher versions failed to capture and record VNC monitors with segfaults or

Code: Select all

Could not send frame (error 'Resource temporarily unavailable') zm_videostore.cpp 1255
User avatar
iconnor
Posts: 3391
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: api/events/index/MonitorId:1.json "limit" query parameter no longer works in recent versions (and VNC monitor proble

Post by iconnor »

Events are now unlimited by default, you have to pass limits into the query.

How to downgrade? apt install zoneminder=whatever version you want

How to see what versions are available ? apt-cache madison zoneminder
User avatar
iconnor
Posts: 3391
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: api/events/index/MonitorId:1.json "limit" query parameter no longer works in recent versions (and VNC monitor proble

Post by iconnor »

I realise that you are passing limit... I"m not sure it was ever actually honoured. Maybe it was. THe code that got removed use ZM_EVENTS_PER_PAGE and a hard limit of 100.

I hust added a line to respect a limit param... not sure about the direction= in your url... not sure that is honoured by anything.

Isaac
MarsRover
Posts: 49
Joined: Sat Apr 30, 2022 10:34 am

Re: api/events/index/MonitorId:1.json "limit" query parameter no longer works in recent versions (and VNC monitor proble

Post by MarsRover »

iconnor wrote: Sun Jun 22, 2025 1:47 am I hust added a line to respect a limit param... not sure about the direction= in your url... not sure that is honoured by anything.
Isaac
Thanks, I'll check if it works later.

The goal of this query is to get only the last/current event.
direction query parameter is documented here https://zoneminder.readthedocs.io/en/la ... ted-events, it's the sort field order, ascending or descending.

It did work before.
Post Reply