Page 1 of 1
API not working
Posted: Fri Nov 03, 2017 9:01 am
by claudioita
Newb here. ZOneminder 1.30.4 under Ubuntu 17.10
http://192.168.1.12/zm/index.php
works fine.
http://192.168.1.12/zm/api/host/getVersion.json
brings nothing.
Tried to install zmninja and says API not working.
But I have no idea what an API is, and how to check.
Any help? Thanks
Re: API not working
Posted: Fri Nov 03, 2017 12:22 pm
by bbunge
Known issue. There is a prior forum post about this. Alt install procedure at:
https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way
I strongly recommend you go back to Ubuntu 16.04!
Re: API not working
Posted: Fri Nov 03, 2017 12:27 pm
by akg1508
The API is what allows external programs such as zmNinja to access zoneminder, it stands for Application Programming Interface (from memory).
First you'll need to ensure that the API is installed, my Ubuntu 16.04 1.30.x installation has it in /usr/share/zoneminder/www/api.
The ensure that it is enabled, i.e. OPT_USE_API is checked in the System config.
Also take a look at:
http://zoneminder.readthedocs.io/en/stable/api.html
(There's no point playing with zmNinja until you've got the curl commands working
)
HTH,
Alistair
Re: API not working
Posted: Fri Nov 03, 2017 12:31 pm
by claudioita
you mean with the alternative procedure will work? Or do I need to do a Ubuntu 16.04?
Re: API not working
Posted: Fri Nov 03, 2017 1:22 pm
by claudioita
akg1508 wrote: ↑Fri Nov 03, 2017 12:27 pm
The API is what allows external programs such as zmNinja to access zoneminder, it stands for Application Programming Interface (from memory).
First you'll need to ensure that the API is installed, my Ubuntu 16.04 1.30.x installation has it in /usr/share/zoneminder/www/api.
The ensure that it is enabled, i.e. OPT_USE_API is checked in the System config.
Also take a look at:
http://zoneminder.readthedocs.io/en/stable/api.html
(There's no point playing with zmNinja until you've got the curl commands working
)
HTH,
Alistair
yes the directory has files inside (not sure if are the right ones)
yes the OPT_USE_API is checked in the System config.
Re: API not working
Posted: Fri Nov 03, 2017 1:27 pm
by claudioita
when I ran this I receive no answer
claudio@NUC-UBUNTU:~$ curl
http://192.168.1.12/zm/api/monitors/1.json
claudio@NUC-UBUNTU:~$ curl
http://192.168.1.12/zm/api/host/getVersion.json
claudio@NUC-UBUNTU:~$ curl
http://192.168.1.12/zm/api/host/getVersion.json
claudio@NUC-UBUNTU:~$
Re: API not working
Posted: Fri Nov 03, 2017 4:55 pm
by bbunge
claudioita wrote: ↑Fri Nov 03, 2017 12:31 pm
you mean with the alternative procedure will work? Or do I need to do a Ubuntu 16.04?
yes to both questions.
You can play with your 17.10 setup for a long time and not get it to work. 16.04 is what i recommend!
Re: API not working
Posted: Fri Nov 03, 2017 6:07 pm
by claudioita
bbunge wrote: ↑Fri Nov 03, 2017 4:55 pm
claudioita wrote: ↑Fri Nov 03, 2017 12:31 pm
you mean with the alternative procedure will work? Or do I need to do a Ubuntu 16.04?
yes to both questions.
You can play with your 17.10 setup for a long time and not get it to work. 16.04 is what i recommend!
Ok, I have nothing installed I can do a fresh install. Ubunty 16 desktop or server?
Re: API not working
Posted: Sat Nov 04, 2017 12:16 pm
by bbunge
claudioita wrote: ↑Fri Nov 03, 2017 6:07 pm
bbunge wrote: ↑Fri Nov 03, 2017 4:55 pm
claudioita wrote: ↑Fri Nov 03, 2017 12:31 pm
you mean with the alternative procedure will work? Or do I need to do a Ubuntu 16.04?
yes to both questions.
You can play with your 17.10 setup for a long time and not get it to work. 16.04 is what i recommend!
Ok, I have nothing installed I can do a fresh install. Ubunty 16 desktop or server?
https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way