Overview

Root URL for VXG Cloud Video: https://web.skyvr.videoexpertsgroup.com/api/v4

Authorization

All function calls require an authorization header.

'Authorization: Acc %channel_access_token%'

The %channel_access_token% can be retrieved in two ways:
a. Using Admin API during creating a channel or updating of a channel access token.
b. Using Cloud/Server Admin UI page.

Example of an authorization header:

'Authorization: Acc eyJhY2Nlc3MiOiAid2F0Y2giLCAidG9rZW4iOiAic2hhcmUuZXlKemFTSTZJRE14T0RoOS41YWEyMjA2N3QxMmNmZjc4MC5GVHpEeUZMYkVLQVNzM2ZJRFZaSDdFMEhhdGMiLCAiY2FtaWQiOiAxMzI0NDUsICJjbW5ncmlkIjogMTMyODUwLCAiYXBpIjogIndlYi5za3l2ci52aWRlb2V4cGVydHNncm91cC5jb20ifQ=='

Functions

Interactive API reference (Swagger): ChannelAPI.html

Get properties

Send a GET-request to:

/channel/

with the authorization header.

Example using curl:

curl \
    -X GET \
    -H 'Authorization: Acc eyJ...0ifQ==' \
    "https://web.skyvr.videoexpertsgroup.com/api/v4/channel/"

Example of a JSON response:

{
 "name": "classroom",
 "timezone": "Canada/Eastern",
 "status": "active",
 "streaming": true,
 "rec_mode": "on",
 "recording": false

}

Where:

Change properties

Send a PUT-request to:

/channel/

with the authorization header.

Followed with the following JSON body:

{
 "name": "classroom",
 "timezone": "Canada/Eastern",
 "rec_mode": "on"

}

Example using curl:

curl \
    -X PUT \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Acc eyJ...0ifQ==' \
    -d '{"name": "classroom", "timezone": "Canada/Eastern", "rec_mode": "on"}' \
    "https://web.skyvr.videoexpertsgroup.com/api/v4/channel/"

Live watch URLs

Send a GET-request to:

/live/watch/

with the authorization header.

Example using curl:

curl \
    -X GET \
    -H 'Authorization: Acc eyJ...0ifQ==' \
    "https://web.skyvr.videoexpertsgroup.com/api/v4/live/watch/"

Example of a JSON response:

{
    "rtc": "https://skyvr.videoexpertsgroup.com:8080?source=rtmp%3A//skyvr.videoexpertsgroup.com%3A1935/live/u5m1c1_primary%3Fticket%3Dmedia.eyJ...QVI",
    "rtmp": "rtmp://skyvr.videoexpertsgroup.com:1935/live/u1976m5432c5404_primary?ticket=media.eyJuI...gVQc",
    "hls": "https://skyvr.videoexpertsgroup.com:8008/live/u1976m5432c5404_primary/hls/u1976m5432c5404_primary.m3u8?ticket=media.eyJ...VQc",
    "expire": "2018-05-30T09:47:57.980386"
}

Where:

Live snapshot image

Send a GET-request to:

/live/image/

with the authorization header.

Example using curl:

curl \
    -X GET \
    -H 'Authorization: Acc eyJ...0ifQ==' \
    "https://web.skyvr.videoexpertsgroup.com/api/v4/live/image/"

Example of a JSON response:

{
    "url": "https://skyvr-av-deb.s3.amazonaws.com/u1976/m5432/c5404/preview.jpg?Signature=REPTi06hLh1ki0PeZjToFZGshNE%3D&Expires=1467303243&AWSAccessKeyId=AKIAIQMO6MIU225CBTIA",
    "width": 160,
    "height": 120,
    "size": 4398,
    "time": "2016-06-20T04:13:25.488000",
    "expire": "2016-06-30T16:14:03.514326"
}

Where:

Live video source info

Returns a description of the video source:
Video publishing URL for push channels Source URL for pull channels.

Send a GET-request to:

/live/source/

with the authorization header.

Example using curl:

curl \
    -X GET \
    -H 'Authorization: Acc eyJ...0ifQ==' \
    "https://web.skyvr.videoexpertsgroup.com/api/v4/live/source/"

Example of a JSON response for push channels:

{
  "type": "push",
  "rtmp": "rtmp://media.auth2.cloud-svcp.com:1935/live/u5m8273c8155_rtmp_publish?ticket=cam.eyJ...uSA"
}

Example of a JSON response for pull channels:

{
  "type": "pull",
  "url": "rtsp://207.323.44.56:554",
  "login": "user1",
  "password": "pwd"
}

Where:

Live video source update

Updates the channel's details.

Send a PUT-request to:

/live/source/

with the authorization header and a JSON body as below:

{
  "url": "rtsp://207.323.44.56:554",
  "login": "user1",
  "password": "pwdpwd",
}

Example using curl:

curl -X PUT
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Acc eyJ...0ifQ==' \
    -d '{ "url": "rtsp://207.323.44.56:554", "login": "user1", "password": "pwdpwd", "type": "pull"}' \
    'https://web.skyvr.videoexpertsgroup.com/api/v4/live/source/'

Clip's creation

Creates a new clip for the channel.

Send a POST-request to:

/clips/

with the authorization header and a JSON body as below:

{
  "start": "2016-06-19T17:07:06",
  "end": "2016-06-19T17:07:26",
  "wait_for_data": false
}

Example using curl:

curl \
    -X POST \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Acc eyJ...0ifQ==' \
    -d '{"start": "2016-06-19T17:07:06", "end": "2016-06-19T17:07:26", "wait_for_data": "false"}' \
    "https://web.skyvr.videoexpertsgroup.com/api/v4/clips/"

Where:

wait_for_data – an optional boolean parameter:

Example of a JSON response:

{
  "id": 86,
  "start": "2016-06-19T17:07:06",
  "end": "2016-06-19T17:07:26",
  "url": "https://skyvr-av-deb.s3.amazonaws.com/u1976/m5432/c5404/clips/86_d20.mp4?Signature=PzcZokYKPNlLS2WyG4O9rOA2Tqc%3D&Expires=1467725497&AWSAccessKeyId=AKIAIQMO6MIU225CBTIA&response-content-disposition=attachment%3B%20filename%2A%3DUTF-8%27%271.mp4",
  "size": 1331382,
  "duration": 20,
  "thumb": {
    "url": "https://skyvr-av-deb.s3.amazonaws.com/u1976/m5432/c5404/preview.jpg?Signature=REPTi06hLh1ki0PeZjToFZGshNE%3D&Expires=1467303243&AWSAccessKeyId=AKIAIQMO6MIU225CBTIA",
    "width": 160,
    "height": 120,
    "size": 4398,
    "time": "2016-06-20T04:13:25.488000"
  },
}

Clips information

Returns array of clips for the channel.

Send a GET-request to:

/clips/

with the authorization header.

Example using curl:

curl \
    -X GET \
    -H 'Authorization: Acc eyJ...0ifQ==' \       
    "https://web.skyvr.videoexpertsgroup.com/api/v4/clips/"

Example of a JSON response:

{
  "objects": [
    {
      "id": 86,
      "start": "2016-06-19T17:07:06",
      "end": "2016-06-19T17:07:26",
      "url": "https://skyvr-av-deb.s3.amazonaws.com/u1976/m5432/c5404/clips/86_d20.mp4?Signature=Pzc...TIA&response-content-disposition=attachment%3B%20filename%2A%3DUTF-8%27%271.mp4",
      "size": 1331382,
      "duration": 20,
      "status": "done",
      "thumb": {
        "url": "https://skyvr-av-deb.s3.amazonaws.com/u1976/m5432/c5404/preview.jpg?Signature=REP...shNE%3D&Expires=1467303243&AWSAccessKeyId=AKIAIQMO6MIU225CBTIA",
        "width": 160,
        "height": 120,
        "size": 4398,
        "time": "2016-06-20T04:13:25.488000"
      },
    }
  ],
  "meta": {
    "limit": 1,
    "offset": 1,
    "next": "?offset=2&limit=1",
    "previous": "?offset=0&limit=1",
    "total_count": 5
  }
}

Clips deleting

Deletes all clips for the channel.

Send a DELETE-request to:

/clips/

with the authorization header.

Example using curl:

curl \
    -X DELETE \
    -H 'Authorization: Acc eyJ...0ifQ==' \
    "https://web.skyvr.videoexpertsgroup.com/api/v4/clips/"

Single clip information

Returns clip info for a specific clip identifier.

Send a GET-request to:

/clips/{CLID}/

with the authorization header.

Example using curl:

curl \
    -X GET \
    -H 'Authorization: Acc eyJ...0ifQ==' \
    "https://web.skyvr.videoexpertsgroup.com/api/v4/clips/86/"

Example of a JSON response:

{
  "id": 86,
  "start": "2016-06-19T17:07:06",
  "end": "2016-06-19T17:07:26",
  "url": "https://skyvr-av-deb.s3.amazonaws.com/u1976/m5432/c5404/clips/86_d20.mp4?Signature=Pzc..2Tqc%3D&Expires=1467725497&AWSAccessKeyId=AKIAIQMO6MIU225CBTIA&response-content-disposition=attachment%3B%20filename%2A%3DUTF-8%27%271.mp4",
  "size": 1331382,
  "duration": 20,
  "thumb": {
    "url": "https://skyvr-av-deb.s3.amazonaws.com/u1976/m5432/c5404/preview.jpg?Signature=REP...hNE%3D&Expires=1467303243&AWSAccessKeyId=AKIAIQMO6MIU225CBTIA",
    "width": 160,
    "height": 120,
    "size": 4398,
    "time": "2016-06-20T04:13:25.488000"
  },
}

Single clip deleting

Deletes a clip with a specific clip identifier.

Send a DELETE-request to:

/clips/{CLID}/

with the authorization header.

Example using curl:

curl \
    -X DELETE \
    -H 'Authorization: Acc eyJ...0ifQ==' \
    'https://web.skyvr.videoexpertsgroup.com/api/v4/clips/86/'

Retrieving video records

Returns an array of recorded mp4 files.

Send a GET-request to:

/storage/records/

with the authorization header and and parameters start and end.

Example using curl:

curl \
    -X GET \
    -H 'Authorization: Acc eyJ...0ifQ==' \
    'https://web.skyvr.videoexpertsgroup.com/api/v4/storage/records/?start=2016-06-19T17:07:06&end=2016-06-19T17:07:26'

Example of a JSON response:

{
  "objects": [
    {
      "start": "2016-06-08T19:59:15",
      "end": "2016-06-08T20:00:16",
      "url": "https://skyvr-av-deb./../195915_Primary_d61.mp4",
      "size": 1108971
    }
  ],
  "meta": {
    "limit": 1,
    "offset": 1,
    "next": "?offset=2&limit=1",
    "previous": "?offset=0&limit=1",
    "total_count": 5,
    "expire": "2016-06-27T04:55:06.654818"
  }
}

Uploading video records

This operation is performed in two steps.

The first step is retrieving an upload link.

Send a POST-request to:

/storage/records/upload/

with the authorization header and a JSON body as below:

[
  {
    "duration": 61152,
    "size": 8684289,
    "time": "2016-06-20T04:13:25.488000"
  }
]

Where:

Example using curl:

curl \ 
    -X POST \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Acc eyJ...0ifQ==' \
    -d '[ \
          { \
            "duration": 61152, \
            "size": 8684289, \
            "time": "2016-06-20T04:13:25.488000" \
          } \
        ]' \
    'https://web.skyvr.videoexpertsgroup.com/api/v4/storage/records/upload/'

Example of a JSON response:

{
  "urls": [
    "https://skyvr-av-deb.../915_Primary_d61.mp4?Signature=WcU%2...%3D"
  ],
  "expire": "2016-08-27T20:55:06.654818"
}

The second step is to upload file to the upload link.

Example using curl:

curl \
    -X PUT \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H "Content-Length: 78415" -H "Content-Type: video/mp4" \
    -T "1.mp4" \
    "https://skyvr-av-deb.../915_Primary_d61.mp4?Signature=WcU%2...%3D"

Retrieving recorded images

Returns an array of recorded JPEG files.

Send a GET-request to:

/storage/images/

with the authorization header and parameters start and end.

Example using curl:

curl \
    -X GET \
    -H 'Authorization: Acc eyJ...0ifQ==' \
    'https://web.skyvr.videoexpertsgroup.com/api/v4/storage/images/?start=2016-06-19T17:07:06&end=2016-06-19T17:07:26'

Example of a JSON response:

{
  "objects": [
    {
      "url": "https://skyvr-av-deb./../m5432/c5404/preview.jpg",
      "width": 160,
      "height": 120,
      "size": 4398,
      "time": "2016-06-20T04:13:25.488000",
      "expire": "2016-06-30T16:14:03.514326"
    }
  ],

  "meta": {
    "limit": 1,
    "offset": 1,
    "next": "?offset=2&limit=1",
    "previous": "?offset=0&limit=1",
    "total_count": 5,
    "expire": "2016-06-27T04:55:06.654818"
  }
}

Uploading images

This operation is performed in two steps.

The first step is retrieving an upload link.

Send a POST-request to:

/storage/images/upload/

with the authorization header and a JSON body as below:

[
  {
    "width": 160,
    "height": 120,
    "size": 4398,
    "time": "2016-06-20T04:13:25.488000"
  }
]

Where:

Example using curl:

curl \ 
    -X POST \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Acc eyJ...0ifQ==' \
    -d '[
      { \
        "width": 160, \
        "height": 120, \
        "size": 4398, \
        "time": "2016-06-20T04:13:25.488000" \
      } \
    ] \
    'https://web.skyvr.videoexpertsgroup.com/api/v4/storage/images/upload/'

Example of a JSON response:

{
  "urls": [
    "https://skyvr-av-deb.../915_Primary_d61.jpg?Signature=WcU%2...%3D"
  ],
  "expire": "2016-08-27T20:55:06.654818"
}

The second step is to upload a file to the upload link.

Example using curl:

curl \
    -X PUT \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H "Content-Length: 78415" -H "Content-Type: image/jpeg" \
    -T "1.jpg" \
    "https://skyvr-av-deb.../915_Primary_d61.jpg?Signature=WcU%2...%3D"

Retrieving the timeline

Send a GET-request to:

/storage/timeline/

with the authorization header and parameters:

Example using curl:

curl \
    -X DELETE \
    -H 'Authorization: Acc eyJ...0ifQ==' \
    'https://web.skyvr.videoexpertsgroup.com/api/v4/storage/timeline/?slice=1'

Example of JSON response:

 {
  "objects": [
    {
      "60": [
        [
          "2016-06-17T09:06:32",
          240885
        ]
      ]
    }
  ],
  "meta": {
    "next": "http://skyvr.videoexpertsgroup.com/api/v2/storage/timeline/5404/?start=2016-06-17T11%3A09%3A57&limit=3&slices=1"
  }
}

Retrieving the calendar

Send a GET-request to:

/storage/calendar/

with the authorization header and parameters:
start – {optional) start time.
end – {optional} end time.

Example using curl:

curl \
    -X DELETE \
    -H 'Authorization: Acc eyJ...0ifQ==' \
    'https://web.skyvr.videoexpertsgroup.com/api/v4/storage/calendar'

Example of JSON response:

{
  "objects": [
    "2016-06-08",
    "2016-06-09",
    "2016-06-17",
    "2016-06-18",
    "2016-06-19"
  ],
  "meta": {
    "limit": 1,
    "offset": 1,
    "next": "?offset=2&limit=1",
    "previous": "?offset=0&limit=1",
    "total_count": 5
  }
}