API Documentation

Store Occupancy Manager 1.x API

Store Occupancy Manager is a new ACAP application for ARTPEC-5/6/7 AXIS IP cameras that enables retailers to track, count, and limit the number of people inside the store. It runs directly onboard the cameras and is extremely easy to install, setup, and integrate with other systems.

Supported counters: Axis Occupancy Estimator, Axis People Counter, Xovis Counter


How to get and change the whole configuration of service


Get configuration of service

Complete settings of overlay services in JSON format can be obtained with GET call below.

http://USER:PASS@IPADDR[:PORT]/axis-cgi/param.cgi?action=list&group=storeoccupancymanager.Configuration

where

USER is an user name. E.g. root
PASS is a password . E.g. pass
IPADDR[:PORT] is an IP address:port of the camera. E.g. 192.168.1.5.

Example of what you get:

{
      "counter_camera_host": "127.0.0.1",
      "counter_camera_port": 80,
      "counter_camera_user": "root",
      "counter_camera_pass": "",
      "counter_camera_type": "aoe",
      "counter_camera_element_name": "",
      "counter_camera_list": [{
        "host": "127.0.0.1",
        "port": 80,
        "user": "root",
        "pass": "",
      },
      .....
      ],
      "max_in_store_limit": 10,
      "stream_width": 1920,
      "stream_height": 1080,
      "camera_list": [0],
      "counter_graphics": {
        "enabled": true,
        "coordSystem": "top_left",
        "pos_x": 10,
        "pos_y": 10,
        "scale": 1.0,
        "image_enter": "",
        "image_stop": "",
        "label_max_limit": "",
        "label_in_store": "",
        "label_may_enter": "",
        "fullscreen": false,
        "schedule": ""
      },
      "additional_graphics": [{
        "visibility": "always",
        "coordSystem": "top_left",
        "pos_x": 10,
        "pos_y": 10,
        "scale": 1.0,
        "image": "",
        "schedule": ""
      },
      .....
      ],
      "infoticker": {
        "enabled": false,
        "showClock": 1,
        "clockType": "24h",
        "textColor": "0,0,0,1",
        "bgColor": "255,255,255,1",
        "numberOfLines": 1,
        "switchingTime": 5,
        "crawlLeft": false,
        "crawlSpeed": 1.0,
        "fontSize": 40,
        "sourceType": "",
        "source": "",
        "schedule": ""
      },
      "event_max_in_store_limit": -1
}
        

When event_max_in_store_limit is set to -1 max_in_store_limit is considered as limit for an event as well.



Set configuration of service


GET request

If you want to update your service settings, you can use GET request:

http://USER:PASS@IPADDR[:PORT]/axis-cgi/param.cgi?action=update&storeoccupancymanager.Configuration=PARAMVALUE

where

USER is an user name. E.g. root
PASS is a password . E.g. pass
IPADDR[:PORT] is an IP address:port of the camera. E.g. 192.168.1.5
PARAMVALUE is a value you would like to save to Store Occupancy Manager. Special characters in the value have to be urlencoded. See URL encoding.

GET request has a limit for 2048 characters (in Unicode). Updated information via the given HTTP requests is not saved persistently in the camera. Therefore, data is lost after a camera restart. In order to avoid the loss of information, it is necessary to update data on a regular basis or update the whole JSON Store Occupancy Manager configuration via a POST request.


POST request

You can use POST request:

http://USER:PASS@IPADDR[:PORT]/axis-cgi/param.cgi

in data param (multipart/form-data) of POST request must contains:

action: update
StoreOccupancyManager.Configuration: PARAMVALUE

where

USER is an user name. E.g. root
PASS is a password . E.g. pass
IPADDR[:PORT] is an IP address:port of the camera. E.g. 192.168.1.5
PARAMVALUE is a value you would like to save to Store Occupancy Manager.




HTTP request to display/hide the particular overlay

Following GET request requires an empty schedule. In Additional graphics section check also visibility settings.

For example:

http://USER:PASS@IPADDR[:PORT]/local/storeoccupancymanager/api/enabled.cgi?COUNTER_GRAPHICS=1&ADDITIONAL_GRAPHICS_X=1&INFOTICKER=1

where

USER is an user name. E.g. root
PASS is a password . E.g. pass
IPADDR[:PORT] is an IP address:port of the camera. E.g. 192.168.1.5
SERVICE_ID is an ID of overlay service which you want to change and is written as id_X, X is the number of the service
COUNTER_GRAPHICS valid values: 0, 1
ADDITIONAL_GRAPHICS_X - X is the number of additional graphics. Valid values: 0, 1
INFOTICKER valid values: 0, 1

Updated information via the given HTTP requests is not saved persistently in the camera. Therefore, data is lost after a camera restart. In order to avoid the loss of information, it is necessary to update data on a regular basis or update the whole JSON Store Occupancy Manager configuration via a POST request. (See section with SET example)




Feel free to contact our support in case of any problem.