zmNinja API help please

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
Seanc18
Posts: 11
Joined: Wed Oct 18, 2023 10:46 am

zmNinja API help please

Post by Seanc18 »

Zoneminder v1.36.32
zmNinja v1.6.009

Needing some help, I have my cameras and ptz control all working but
I am not able to connect zmNinja to zoneminder api.
I get a Loging successfull and API failed.

When I try loging from terminal with
curl -XPOST -d "user=admin&pass=admin" -c cookies.txt http://192.168.5.50/zm/api/host/login.json

I get this return of 404 not found.
When I look in the api directory every thing is there.
192.168.5.50/zm opens the zoneminder web console
But any directory inside usr/share/zm/ will show 404 not found.

I pasted some of the info referenced and I also pasted the log from zmNinja when I try to connect.
zmNinja 1.6.009 LOG Oct 24, 2023 09:19:14:010 PM INFO CACHE: error with http get {"status":404,"headers":{"server":"Apache/2.4.55 (Ubuntu)","keep-alive":"timeout=5, max=100","content-type":"text/html; charset=iso-8859-1","content-length":"274","connection":"Keep-Alive","date":"Tue, 24 Oct 2023 21:19:13 GMT"},"url":"http://192.168.5.50:80/zm/api/host/getV ... "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p>The requested URL was not found on this server.</p>\n<hr>\n<address>Apache/2.4.55 (Ubuntu) Server at 192.168.5.50 Port 80</address>\n</body></html>\n"}
Oct 24, 2023 09:19:14:010 PM DEBUG *** Inside native HTTP error for url:{"status":404,"headers":{"server":"Apache/2.4.55 (Ubuntu)","keep-alive":"timeout=5, max=100","content-type":"text/html; charset=iso-8859-1","content-length":"274","connection":"Keep-Alive","date":"Tue, 24 Oct 2023 21:19:13 GMT"},"url":"http://192.168.5.50:80/zm/api/host/getV ... rror":"<!D
sean@media:/usr/share/zoneminder/www/api$ ls
app CONTRIBUTING.md lib
build.properties css README.md
build.xml img
composer.json index.php



sean@media:~$ curl -XPOST -d "user=admin&pass=admin" -c cookies.txt http://192.168.5.50/zm/api/host/login.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 was not found on this server.</p>
<hr>
<address>Apache/2.4.55 (Ubuntu) Server at 192.168.5.50 Port 80</address>
</body></html>
User avatar
iconnor
Posts: 3391
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: zmNinja API help please

Post by iconnor »

Your apache config probably doesn't include or has the wrong setup for api. Debian examples don't have it at all.

Shows us your apache config for zm.
Post Reply