zones.json

Forum for questions and support relating to the 1.29.x releases only.
Locked
earlymeadow
Posts: 3
Joined: Thu Jun 16, 2016 5:50 am

zones.json

Post by earlymeadow »

If I curl http://server/zm/api/zones.json it appears to return a list of all available zones. Now that I've been adding and deleting zones, I noticed that only 20 zones are returned, whilst I have a few more.

I don't see any pagination item, so there's no way to tell if there are more zones. Also, http://server/zm/api/zones.json?page=1 does nothing more that return the same 20 zones.

I am able to get the neccessary zone info by getting http://server/zm/api/zones/44.json, but seeing as deleting zones leaves holes in the zone numbering (zid), I have no way of knowing when to stop "getting zones" one by one.

I know I'm using an undocumented API feature, but it would save me a lot of unneccessary calls if it would work as suspected ;).

Am I doing something horribly wrong, or is this a bug?

(using 1.29 cent os 7) (also posted in github https://github.com/ZoneMinder/ZoneMinder/issues/1537)
Locked