Remote camera access and VAPIX camera interface

Every Axis IP camera has an HTTP API called AXIS VAPIX. Sure you can call it directly via local IP address. In this chapter we describe how to access the HTTP interface on the remote camera.

A camera connected to the cloud receives a unique URL that allows remote access to the camera. The URL always consists of the camera's serial number and the first- and second-order domains device-connect.net.

https://SerialNumber.device-connect.net/ 

Such access is particularly suitable for programmatic control of the camera via the VAPIX interface. You can also control ACAP applications running on the camera.

VAPIX is an application interface that allows you to control the camera and change its parameters.

VAPIX provides functionality for requesting images, controlling Pan Tilt Zoom, controlling input/output ports, retrieving and controlling internal settings, managing events, recording and retrieving video to/from the SD card, and much more.

With remote access, you can also control the API of installed ACAP applications.

To authorize access to the camera and its VAPIX API, an API token with the Configuration permission (DEVICE_ACCESS_TOKEN) must be generated. The exact procedure for generating the TOKEN can be found in this article. 


Example of a request to the camera API

From the URL and DEVICE_ACCESS_TOKEN you can make a request for the VAPIX interface of the camera:

https://serialnumber.device-connect.net/axis-cgi/param.cgi?action=update&ImageSource.I0.Sensor.Brightness=89&root.ImageSource.I0.Sensor.ColorLevel=91&DEVICE_ACCESS_TOKEN=NvA7fxxxxxtYVQ

where:

  • serialnumber is the serial number of the camera

  • /axis-cgi/param.cgi is the standard URL on the VAPIX interface

  • ?action=update&ImageSource.I0.Sensor.Brightness=89&root.ImageSource.I0.Sensor.ColorLevel=91 is a VAPIX request. In this case, we change the brightness and saturation of the image

  • &DEVICE_ACCESS_TOKEN=NvA7fxxxxxtYVQ is a one-time access token listed as the last parameter of the query

 

Mind that the DEVICE_ACCESS_TOKEN can be passed as HTTP query parameter (see above) or HTTP header.