Difference between revisions of "API"

From ZoneMinder Wiki
Jump to navigationJump to search
(Created page with "This is community documentation for the API. To see official documentation, review zoneminder.readthedocs.org ==Basic API Test (1.32.3)== Use this command to confirm the API...")
 
Line 5: Line 5:
  curl -X POST -d "user=somename&pass=somepass" http://serverip/zm/api/host/getVersion.json
  curl -X POST -d "user=somename&pass=somepass" http://serverip/zm/api/host/getVersion.json
Make sure all of this is included. It is not necessary to use login.json before running this command. The ampersand must be between user and pass.
Make sure all of this is included. It is not necessary to use login.json before running this command. The ampersand must be between user and pass.
==SSL Configuration==
Related to the API,  if you wish to have some encryption, refer to /etc/apache2/ports.conf
You will see that it requires the ssl module, and the symbolic link.
a2enmod ssl
And add the symbolic link for /etc/apache2/sites-available/default-ssl.conf to sites-enabled.

Revision as of 18:06, 17 March 2020

This is community documentation for the API. To see official documentation, review zoneminder.readthedocs.org

Basic API Test (1.32.3)

Use this command to confirm the API is working.

curl -X POST -d "user=somename&pass=somepass" http://serverip/zm/api/host/getVersion.json

Make sure all of this is included. It is not necessary to use login.json before running this command. The ampersand must be between user and pass.

SSL Configuration

Related to the API, if you wish to have some encryption, refer to /etc/apache2/ports.conf You will see that it requires the ssl module, and the symbolic link.

a2enmod ssl

And add the symbolic link for /etc/apache2/sites-available/default-ssl.conf to sites-enabled.