/api/host folder missing

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
px03afk
Posts: 77
Joined: Wed Nov 30, 2011 4:53 pm

/api/host folder missing

Post by px03afk »

I know I am unusual as I take zoneminder from source but I've been doing that for 10 years and more. I have jut recently started using openHAB and noticed a Zoneminder binding so I thought I'd have a look. However, the binding says it can't get the version number and on closer inspection I find that there is no host directory below the api directory. But, when I look at the source it isn't there either so where do I get that part of the api?
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: /api/host folder missing

Post by Magic919 »

They don't exist on the filesystem. Sort out your Apache config would be my guess.
-
px03afk
Posts: 77
Joined: Wed Nov 30, 2011 4:53 pm

Re: /api/host folder missing

Post by px03afk »

I'm not sure I understand how making changes to the Apache config will link things into Zoneminder when they aren't even on my machine. I keep reading that I should follow the installation guide and I've seen the section about the Apache config but that doesn't mention a host directory either.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: /api/host folder missing

Post by Magic919 »

There is no host directory. There shouldn't be.
-
px03afk
Posts: 77
Joined: Wed Nov 30, 2011 4:53 pm

Re: /api/host folder missing

Post by px03afk »

Now I am even more confused. In the api documentation it says to get the api version to use the command "curl http://server/zm/api/host/getVersion.json". If there is no host directory then how does Apache know where to look?
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: /api/host folder missing

Post by Magic919 »

It's in the Apache configuration.

Have a look https://github.com/ZoneMinder/zoneminde ... inder.conf
-
px03afk
Posts: 77
Joined: Wed Nov 30, 2011 4:53 pm

Re: /api/host folder missing

Post by px03afk »

Thank you for the pointer. It's starting to make more sense now but I haven't yet got it working.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: /api/host folder missing

Post by Magic919 »

Glad to hear it’s progressing. There is documentation on the ZM API that could potentially help https://zoneminder.readthedocs.io/en/latest/api.html
-
px03afk
Posts: 77
Joined: Wed Nov 30, 2011 4:53 pm

Re: /api/host folder missing

Post by px03afk »

Once I realised that cake does the work within the api and that the missing folder is effectively a part of cake I eventally managed to get things working. It probably doesn't help that I am using OpenSUSE and I had to look closely at the configuration plus there is no package for apcu_bc for Suse so I had to download it and install using pecl. I now have a link from OpenHAB to zoneminder and the only thing I don't seem to have working at this moment is the ability to look at images.
User avatar
Bobnatural
Posts: 1
Joined: Wed May 26, 2021 9:23 am

Re: /api/host folder missing

Post by Bobnatural »

Double-check your openHAB configuration for the Zoneminder binding, especially if you're dealing with a B2B API meaning. Ensure that you have provided the correct B2B API URL and credentials. The binding might be looking for the "host" directory within the B2B API URL, so make sure that the URL structure matches the expectations of the binding. It's crucial to verify the accuracy of your configuration to establish a seamless connection between openHAB and the B2B API.
Post Reply