REST API has a REST API that allows to access all functionality that is available in the frontend UI. This also includes the key-value pairs that are used in templating. A full REST API description can be found following the link. For your convenience and to enable simple testing a sandbox option is available for testing API calls.

Below we show you how to use the REST API with some cURL examples.

Sandbox access

On the API page there is a sandbox option that allows to easily extract json information when logged in. This helps to test any query quickly and to extract additional information.


Below we will give some example cURL queries to get you started quickly:

Return inventory list

This shows how to return the full inventory list

curl --digest -u<your_password> -X  "GET" -H "Content-type: application/x-www-form-urlencoded"

Set device name, address and location

This CURL call shows how to set a new device name, an address and the location with latitude and longitude.

curl --digest -u<your_password> -X "PATCH" -d "_format=json&device_name=new+name&city=Oslo&zip=1111&address=Storgata&latitude=60.321&longitude=20.123" -H "Content-type:application/x-www-form-urlencoded"

Upload a file through the qbee API

This example shows how to upload a file to the qbee file manager.

curl --digest -u YOUR_USER_MAIL:YOUR_PASSWORD -i -X POST -H "Content-Type: multipart/form-data" -F "path=/" -F ""

Delete and upload new file

Assume that you need to replace a key on a device or you want to play out a script or change a configuration. Then you can delete the old file and replace it. If this is part of a file distribution it will automatically be played out again. If a command to run is associated with the file distribution this will run again as well. This means that you could change a file and then this would trigger a recomplation on the device. Or it could be a configuration change and this will trigger a service to be restarted.

Delete file:

curl --digest -u YOUR_USER_MAIL:YOUR_PASSWORD -i -X "DELETE" -d "path=/" -H "Content-type: application/x-www-form-urlencoded"

Upload new file:

curl --digest -u YOUR_USER_MAIL:YOUR_PASSWORD -i -X POST -H "Content-Type: multipart/form-data" -F "path=/" -F ""