Control camera with the API
Posted: Sat Aug 05, 2023 8:26 pm
Hi all,
I'm using 1.36.33 version of zoneminder on debian bookworm.
I'm trying to use API zoneminder.
My nginx configuration have this lines for API.
Is it correct ?
I check all available camera with this command.
And i try to change the name of one camera.
After checking with monitors.json, the name doesn't changed and nginx give the following result.
I'm using this documentation. It's a good one ?
https://sgzoneminder.readthedocs.io/en/ ... n/api.html
Have you an idea about this ?
Thanks a lot
I'm using 1.36.33 version of zoneminder on debian bookworm.
I'm trying to use API zoneminder.
My nginx configuration have this lines for API.
Is it correct ?
Code: Select all
location /zm/api {
rewrite ^/zm/api(.+)$ /zm/api/app/webroot/index.php?p=$1 last;
}
Code: Select all
curl -d "username=user&password=mypassword&action=login&view=console" -c cookies.txt http://mydomain/zm/api/monitors.json
Code: Select all
curl -XPUT http://zone.freewind.fr/zm/api/monitors/8.json -d "Monitor[Name]=test1"
Code: Select all
"PUT /zm/api/monitors/X.json HTTP/1.0" 200 8474 "-" "curl/7.88.1"
https://sgzoneminder.readthedocs.io/en/ ... n/api.html
Have you an idea about this ?
Thanks a lot