When I try the API commands as per the documentation I get command not found (after getting cookie information).
------
Code: Select all
$ curl -b cookies.txt http://localhost/zm/api/monitors.json
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /zm/api/monitors.json was not found on this server.</p>
<hr>
<address>Apache/2.4.18 (Ubuntu) Server at localhost Port 80</address>
</body></html>
This makes sense, because when I go to the api directory - this is what I see:
Code: Select all
/usr/share/zoneminder/www/api$ ls -l
total 40
drwxr-xr-x 15 www-data www-data 4096 May 12 10:35 app
-rw-r--r-- 1 www-data www-data 174 Feb 3 17:30 build.properties
-rw-r--r-- 1 www-data www-data 10315 Feb 3 17:30 build.xml
-rw-r--r-- 1 www-data www-data 837 Feb 3 17:30 composer.json
-rw-r--r-- 1 www-data www-data 3252 Feb 3 17:30 CONTRIBUTING.md
-rw-r--r-- 1 www-data www-data 1454 Feb 3 17:30 index.php
drwxr-xr-x 3 www-data www-data 4096 May 1 22:20 lib
-rw-r--r-- 1 www-data www-data 437 Feb 3 17:30 README.md
Thanks in advance....
-----------
Code: Select all
/usr/share/zoneminder/www$ ls -l
total 48
drwxr-xr-x 2 www-data www-data 4096 May 1 22:20 ajax
drwxr-xr-x 4 www-data www-data 4096 May 1 22:20 api
drwxr-xr-x 2 www-data www-data 4096 May 1 22:20 css
lrwxrwxrwx 1 www-data www-data 28 Apr 5 10:50 events -> /var/cache/zoneminder/events
drwxr-xr-x 2 www-data www-data 4096 May 1 22:20 graphics
lrwxrwxrwx 1 www-data www-data 28 Apr 5 10:50 images -> /var/cache/zoneminder/images
drwxr-xr-x 2 www-data www-data 4096 May 1 22:20 includes
-rw-r--r-- 1 www-data www-data 6435 Feb 3 17:30 index.php
drwxr-xr-x 2 www-data www-data 4096 May 1 22:20 js
drwxr-xr-x 2 www-data www-data 4096 May 1 22:20 lang
drwxr-xr-x 5 www-data www-data 4096 May 1 22:20 skins
lrwxrwxrwx 1 www-data www-data 28 May 12 10:13 sounds -> /var/cache/zoneminder/sounds
lrwxrwxrwx 1 www-data www-data 26 Apr 5 10:50 temp -> /var/cache/zoneminder/temp
drwxr-xr-x 3 www-data www-data 4096 May 1 22:20 tools
drwxr-xr-x 2 www-data www-data 4096 May 1 22:20 views