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?
API Events order
Re: API Events order
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.
What I do is grab all pages of events and reverse it in my code.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
-
- Posts: 1
- Joined: Sat Apr 20, 2019 8:00 pm
Re: API Events order
Old post but really high on google search. What we are looking for is documented here:
https://github.com/ZoneMinder/zoneminde ... ted-events
https://github.com/ZoneMinder/zoneminde ... ted-events