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.
Please don't ask me questions via PM. Feel free to post in the forums or Github
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts
-
- 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
Who is online
Users browsing this forum: No registered users and 3 guests