Page 1 of 1

API Events order

Posted: Sat Feb 06, 2016 3:13 pm
by BananaPukeh
I'm trying to get the latest events for a monitor, but since the api only gives 100 events per request this requires a few more requests.

Is there a way to specify the sort order by event StartTime to descending, so I can get the latests events first?

Re: API Events order

Posted: Sat Feb 06, 2016 3:33 pm
by asker
As far as I know, that is not possible today. The EventsController returns events sorted in ascending order. Having said that, CakePHP offers many ways to filter and if you figure out a syntax that works (take a look at http://book.cakephp.org/2.0/en/development/routing.html) let me know.

What I do is grab all pages of events and reverse it in my code.

Re: API Events order

Posted: Mon Aug 26, 2019 3:47 am
by generalredneck
Old post but really high on google search. What we are looking for is documented here:
https://github.com/ZoneMinder/zoneminde ... ted-events