The Video API is a REST API Service used for provisioning and reporting requirements of your Application. The API Service is also required for managing Rooms, requesting token and to obtain usage reports post RTC session.

Table of Contents

Overview

The Video API is for Server to Server calling only. Therefore, the Application Server can only make Video API Call and all requests from Client End points will be denied.

Some applications may require a provisioning request from the Client End Point using your own service API. Following that, the Application Server can request Video Platform using Video API Call and process responses received.

Basic Functions

The Video API is used for the following tasks:

Provisioning Tasks

Transactional Tasks

Post Session Reporting

API Host URL

Sever API Host: https://api.yourcpaas.com/video/

Every major version release of Video API will have a sub-directory named after the major version number. This is known as Base URL for a Video API Version, e.g.

Version Base URL: https://api.yourcpaas.com/video/v2/

All Video API Routes are mapped to the Version Base URL, e.g.

Rooms Route URL: https://api.yourcpaas.com/video/v2/rooms

API Authentication

The Video API uses HTTP Basic Authentication mechanism to authenticate API calls. Each API call is validated via the authentication header.

The following Information is used as credentials to access Video API for your Application in the HTTP basic authentication header in the API call request

  • Application ID or APP_ID as username
  • Application Key or APP_KEY as Password
POST https://api.yourcpaas.com/video/v2/rooms/
Authorization: Basic XXXXXX    
Content-Type: application/json

The Authorization header in the above example contains a value XXXXX which is a base64 encoded string of the APP_ID:APP_KEY.

How to get APP_ID & APP_KEY

All API Credentials are paired to a Project. You will need to create a Project first to receive the API credentials. To create Project, follow the given steps:

  • Login to Provisioning Portal
  • Navigate: {Main Menu} Projects / Create New Project

Once your Project is created, you will receive an email with the Project’s Access Credentials, viz. APP_ID and APP_KEY.

API Responses

The Video API call  make use of  JSON Result Code to determine if the API call is successful.

Success JSON

Successful Video API calls will always return JSON with a 0 (zero) Result Code.

{    
     "result": 0,    
     ….
     ….
 }

Error JSON

If unsuccessful, for whatever reason, the Video API will return a JSON with a non—zero result code. An error response in JSON will always carry 3 keys, viz. Result Code, Error, Description. See example below:

{    
     "result": "Non-Zero Result Code",   
     "error": "Short reason",
     "desc": "Descriptive information about the error / warning"
 }

Result Code Grouping

The Result Codes of Video API are grouped into 5 categories as shown in the table below

CodeCategoryDescription
1xxInformationRequest received & processed
2xxSuccessRequest received & accepted
3xxRedirectionAction required to complete Request
4xxClient ErrorIllegible Request Syntax. Can’t be fulfilled
5xxServer ErrorServer failed to complete a legit Request