Overview

The API for VXG Cloud Video is almost identical to VXG Streaming Server API

Root URLs for VXG Cloud Video:
Authentication (getting API Token): https://cnvrclient2.videoexpertsgroup.com/api
API commands (all other commands): https://web.skyvr.videoexpertsgroup.com/api

Functions

Interactive API reference (Swagger): AdminAPI.html

Authorization

To authorize your requests to Admin API you need to use your license key that you can find in the VXG dashboard: https://dashboard.videoexpertsgroup.com/?products=

The API Key should be injected to Authorization header of every request to Admin API like this:

Authorization: LKey %license_key%

For example, if the API key is "X9tKpuXq0btatj":

Authorization: LKey X9tKpuXq0btatj

Creating a channel

Send a POST-request to:

/api/v3/channels/

With a header:
"Content-Type: application/json"
"Authorization: LKey %license_key%"

And a JSON body as below.

For a Mobile or VXG-enabled IP camera channel:

{
    "name": "Channel name",
    "rec_mode": "on"
}

For a Generic IP camera channel:

{
    "name": "Channel name",
    "rec_mode": "on",
    "source": {
         "url": "rtsp://username:password@hostname:port/path"
    }
}

Where

Example using curl:

curl -X POST \
    -H "Content-Type: application/json" \
    -H "Authorization: LKey %license_key%" \
    -d '{"name":"Test","rec_mode":"off"}' \
    https://web.skyvr.videoexpertsgroup.com/api/v3/channels/

Example of a JSON response:

{
    "access_tokens": {
        "all": "eyJhY2N....MxOTQ0fQ==",
        "watch": "eyJhY2Nlc3...E5NDR9"
    },
    "created": "2018-01-17T12:57:01.268425",
    "id": 131594,
    "name": "Test",
    "rec_mode": "off",
    "timezone": "UTC"
}

Where:

Requesting a channel list

Send a GET-request to:

/api/v3/channels/

With a header only:
"Authorization: LKey %license_key%"

Example using curl:

curl \
    -H "Authorization: LKey %license_key%" \
    "https://web.skyvr.videoexpertsgroup.com/api/v3/channels/"

Example of a JSON response is below:

{
    "meta": {
        "limit": 20,
        "next": null,
        "offset": 0,
        "previous": null,
        "total_count": 2
    },
    "objects": [
        {
            "access_tokens": {
                "all": "eyJhY2N....MxOTQ0fQ==",
                "watch": "eyJhY2Nlc3...E5NDR9"
            },
​
            "created": "2018-01-17T12:57:01.268425",
            "id": 131594,
            "name": "Camera, 2017-12-12T07:45:18",
            "rec_mode": "off",
            "timezone": "UTC"
        },
        {
            "access_tokens": {
                "all": "eyJhY2Nl...IjogMTMxOTQ3fQ==",
                "watch": "eyJhY2Nlc3M....QiOiAxMzE5NDd9"
            },
            "created": "2018-01-17T13:12:17.700075",
            "id": 131597,
            "name": "Name of channel",
            "rec_mode": "off",
            "source": {
                "login": "",
                "password": "",
                "url": "rtsp:\/\/your.public.rtsp.camera.address\/live"
            },
            "timezone": "UTC"
        }]
}

Get a channel info

Send a GET-request to:

/api/v3/channels/%channel_id%/

With a header only:
"Authorization: LKey %license_key%"

Example using curl:

curl -X GET \
    -H "Authorization: LKey %license_key%" \
    "https://web.skyvr.videoexpertsgroup.com/api/v3/channels/%channel_id%/"

Example of a JSON response is below:

{
        {
            "access_tokens": {
                "all": "eyJhY2N....MxOTQ0fQ==",
                "watch": "eyJhY2Nlc3...E5NDR9"
            },
            "created": "2018-01-17T12:57:01.268425",
            "id": 131594,
            "name": "Camera, 2017-12-12T07:45:18",
            "rec_mode": "off",
            "timezone": "UTC"
        }
}

Update a channel info

Send a GET-request to:

/api/v3/channels/%channel_id%/

With a header only:
"Authorization: LKey %license_key%"

Example using curl:

curl -X GET \
    -H "Authorization: LKey %license_key%" \
    -H "Content-Type: application/json" \
    -d '{"name": "New name"}'
    "https://web.skyvr.videoexpertsgroup.com/api/v3/channels/%channel_id%/"

Example of a JSON response is below:

{
        {
            "access_tokens": {
                "all": "eyJhY2N....MxOTQ0fQ==",
                "watch": "eyJhY2Nlc3...E5NDR9"
            },
            "created": "2018-01-17T12:57:01.268425",
            "id": 131594,
            "name": "New name",
            "rec_mode": "off",
            "timezone": "UTC"
        }
}

Delete a channel

Send a DELETE-request to:

/api/v3/channels/%channel_id%/

With a header only:
"Authorization: LKey %license_key%"

Example using curl:

curl -X DELETE \
    -H "Authorization: LKey %license_key%" \
    "https://web.skyvr.videoexpertsgroup.com/api/v3/channels/%channel_id%/"

Get usage limits

Send a GET-request to:

/api/v3/channels/%channel_id%/limits/

With a header only:
"Authorization: LKey %license_key%"

Example using curl:

curl -X GET \
    -H "Authorization: LKey %license_key%" \
    "https://web.skyvr.videoexpertsgroup.com/api/v3/channels/%channel_id%/limits/"

Example of a JSON response is below:

{
  "storage_size": 1073741824,
  "download_size": 1073741824,
  "live_size": 1073741824,
  "records_max_age": 72,
  "issued": "2018-03-12T12:25:13.815",
  "used": {
    "storage_size": 1001741824,
    "download_size": 773741824,
    "live_size": 856732
  }
}

Update usage limits

Send a PUT-request to:

/api/v3/channels/%channel_id%/limits/

With a header:
"Authorization: LKey %license_key%"

Followed with the following JSON body:

{
  "storage_size": "storage size in bytes",
  "download_size": "downloading in bytes",
  "live_size": "live streaming in bytes",
  "records_max_age": "storage depth in hours"
}

Get statistics

Send a GET-request to:

/api/v3/statistics/

With a header:
"Authorization: LKey %license_key%"
and optional parameters
start - start date
end - end date

Example using curl:

curl -X GET \
    -H "Authorization: LKey %license_key%" \
    "https://web.skyvr.videoexpertsgroup.com/api/v3/statistics/?start=2018-05-10&end=2018-05-13"

Example of a JSON response is below:

{
  "records_duration": 5,
  "records_size": 18104123,
  "clips_duration": 1,
  "clips_size": 2343112,
  "images_size": 112034,
  "downloaded_duration": 2,
  "downloaded_size": 3813422,
  "live_duration": 7,
  "live_size": 27103144
}

Get statistics per channel

Send a GET-request to:

/api/v3/statistics/%channel_id%/

With a header:
"Authorization: LKey %license_key%" and optional parameters
start - start date
end - end date

Example using curl:

curl -X GET \
    -H "Authorization: LKey %license_key%" \
    "https://web.skyvr.videoexpertsgroup.com/api/v3/statistics/%channel_id%/?start=2018-05-10&end=2018-05-13"

Example of a JSON response is below:

{
  "records_duration": 5,
  "records_size": 18104123,
  "clips_duration": 1,
  "clips_size": 2343112,
  "images_size": 112034,
  "downloaded_duration": 2,
  "downloaded_size": 3813422,
  "live_duration": 7,
  "live_size": 27103144
}