API not working..

Forum for questions and support relating to the 1.30.x releases only.
Locked
gverbist
Posts: 1
Joined: Sun Aug 07, 2016 6:15 pm

API not working..

Post by gverbist »

Hi Guys,

I just started with ZoneMinder and trying to use API calls from my domotica system..

Trying to change the state of a monitor using this call

curl -XPOST http://server/zm/api/monitors/1.json -d "Monitor[Function]=Modect&Monitor[Enabled]:true"

What happens is that the monitor changes state BUT also goes to the disabled state although it says in the call that it should be enabled..

Anyone can shed some light?
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: API not working..

Post by asker »

The API has a typo in this example. Its been recently corrected - please refer to the "latest" version (not "stable")
http://zoneminder.readthedocs.io/en/latest/api.html

Code: Select all

curl -XPOST http://server/zm/api/monitors/1.json -d "Monitor[Function]=Modect&Monitor[Enabled]=1"
gverbist wrote:Hi Guys,

I just started with ZoneMinder and trying to use API calls from my domotica system..

Trying to change the state of a monitor using this call

curl -XPOST http://server/zm/api/monitors/1.json -d "Monitor[Function]=Modect&Monitor[Enabled]:true"

What happens is that the monitor changes state BUT also goes to the disabled state although it says in the call that it should be enabled..

Anyone can shed some light?
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
Locked