Skip to main content
Skip table of contents

How to access Server API through the Cloud

Once the VXG Server is connected to VXG Cloud, you can access Server API remotely to manage cameras, get live video, etc.

The Server-Cloud connection is established through the channel with a temporary endpoint that expires in a few hours. To be able to work with the Server API remotely, you need to request the endpoint address.

1. Request information for all servers connected to your cloud account:

curl -H "Authorization: LKey <LIC_KEY>"

or for a particular server:

curl<SERVER_ID>/ -H "Authorization: LKey <LIC_KEY>"

Example of the response:

{"api_endpoint": "", 
"endpoint": "", 
"expires": "2021-12-14T23:19:48", 
"id": 352, 
"l_key": "srv.vUEtmR3UsvU4", 
"name": "", 
"online": true, 
"token": "bchan.eyJiY2UiOiAzNTJ9.1639523988.vFDqPE7RhEOpyz9ceKJ2YznBbEI", 
"uuid": "EC24DFC5-F320-BCF8-7D1C-72BE8D15A3F9", 
"version": ""}

2. Now you just need to use the “api_endpoint” from the response for any Server API request, for example, to create a channel:

curl -X POST "" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: LKey srv.vUEtmR3UsvU4" -d "{ \"name\": \"Test channel\", \"rec_mode\": \"on\", \"source\": { \"url\": \"rtsp://\" }}"
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.