{"id":3712,"date":"2021-09-28T19:22:45","date_gmt":"2021-09-28T11:22:45","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=3712"},"modified":"2025-04-05T01:31:58","modified_gmt":"2025-04-04T17:31:58","slug":"server-api","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/server-api\/","title":{"rendered":"Video API"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote\"><p>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.<\/p><\/blockquote>\n\n\n\n<h4>Table of Contents<\/h4>\n\n\n\n<ul><li><a href=\"#overview\">Overview<\/a><\/li><li><a href=\"#basic-functions\">Basic Functions<\/a><\/li><li><a href=\"#api-host-url\">API Host URL<\/a><\/li><li><a href=\"#authentication\">Authentication<\/a><\/li><li><a href=\"#responses\">Responses<\/a> <\/li><\/ul>\n\n\n\n<a name=\"overview\"><\/a>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Overview<\/h2>\n\n\n\n<p>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.  <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" width=\"684\" height=\"211\" src=\"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-content\/uploads\/2025\/04\/server-api-1.png\" alt=\"\" class=\"wp-image-7334\" srcset=\"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-content\/uploads\/2025\/04\/server-api-1.png 684w, https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-content\/uploads\/2025\/04\/server-api-1-300x93.png 300w\" sizes=\"(max-width: 684px) 100vw, 684px\" \/><\/figure><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>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. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" width=\"998\" height=\"237\" src=\"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-content\/uploads\/2025\/04\/server-api-2.png\" alt=\"\" class=\"wp-image-7336\" srcset=\"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-content\/uploads\/2025\/04\/server-api-2.png 998w, https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-content\/uploads\/2025\/04\/server-api-2-300x71.png 300w, https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-content\/uploads\/2025\/04\/server-api-2-768x182.png 768w\" sizes=\"(max-width: 998px) 100vw, 998px\" \/><\/figure><\/div>\n\n\n\n<a name=\"basic-functions\"><\/a>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Basic Functions<\/h2>\n\n\n\n<p>The Video API is used for the following tasks:<\/p>\n\n\n\n<p><strong>Provisioning Tasks <\/strong><\/p>\n\n\n\n<ul><li><a href=\".\/rooms-route\/#create-room\">Create Room to carry out RTC Session<\/a><\/li><li><a href=\".\/rooms-route\/#update-room\">Update Room Information<\/a><\/li><li><a href=\".\/rooms-route\/#delete-room\">Delete Room<\/a><\/li><li><a href=\".\/rooms-route\/#get-rooms\">Get list of Rooms of your Application<\/a><\/li><li><a href=\".\/rooms-route\/#get-room-info\">Get Room Information<\/a><\/li><\/ul>\n\n\n\n<p><strong>Transactional Tasks<\/strong><\/p>\n\n\n\n<ul><li><a href=\".\/rooms-route\/#create-token\"> Create Token to Join a Session <\/a><\/li><\/ul>\n\n\n\n<p><strong>Post Session Reporting<\/strong><\/p>\n\n\n\n<ul><li><a href=\".\/cdr-route\/\">Get Call Detail Report (CDR)<\/a><\/li><li><a href=\".\/archive-route\/\">Get access to Recording, Transcoded Video, Chat Script files <\/a><\/li><\/ul>\n\n\n\n<a name=\"api-host-url\"><\/a>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>API Host URL<\/h2>\n\n\n\n<p><strong>Sever API  Host:<\/strong> https:\/\/api.yourcpaas.com\/video\/<\/p>\n\n\n\n<p>Every major version release of Video API will have a sub-directory named after the major version number. This is known as&nbsp;<em>Base URL for a Video API Version<\/em>, e.g.<\/p>\n\n\n\n<p>     <strong>Version Base URL:<\/strong>  https:\/\/api.yourcpaas.com\/video\/v2\/<\/p>\n\n\n\n<p>     All Video API Routes are mapped to the Version Base URL, e.g.<\/p>\n\n\n\n<p>     <strong>Rooms Route URL:<\/strong> https:\/\/api.yourcpaas.com\/video\/v2\/rooms<\/p>\n\n\n\n<a name=\"authentication\"><\/a>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>API Authentication<\/h2>\n\n\n\n<p>The Video API uses HTTP Basic Authentication mechanism to authenticate API calls. Each API call is validated via the authentication header. <\/p>\n\n\n\n<p>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 <\/p>\n\n\n\n<ul><li><strong>Application ID<\/strong> or <strong>APP_ID<\/strong> as username<\/li><li><strong>Application Key<\/strong> or <strong>APP_KEY<\/strong> as Password<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">POST https:\/\/api.yourcpaas.com\/video\/v2\/rooms\/\nAuthorization: Basic XXXXXX    \nContent-Type: application\/json<\/pre>\n\n\n\n<p>The <code>Authorization<\/code>  header in the above example contains a value XXXXX which is a base64 encoded string of the&nbsp;<strong>APP_ID:APP_KEY<\/strong>.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4>How to get APP_ID &amp; APP_KEY<\/h4>\n\n\n\n<p>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:<\/p>\n\n\n\n<ul><li>Login to Provisioning Portal<\/li><li><strong>Navigate: <\/strong>{Main Menu} Projects \/ Create New Projec<em>t<\/em><\/li><\/ul>\n\n\n\n<p>Once your Project is created, you will receive an email with the Project&#8217;s Access Credentials, viz. APP_ID and APP_KEY.<\/p>\n\n\n\n<a name=\"responses\"><\/a>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>API Responses<\/h2>\n\n\n\n<p>The Video API call &nbsp;make use of &nbsp;JSON Result Code to determine if the API call is successful.  <\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4>Success JSON<\/h4>\n\n\n\n<p>Successful Video API calls will always return JSON with a 0 (zero) Result Code. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{    \n     \"result\": 0,    \n     \u2026.\n     \u2026.\n }<\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4>Error JSON<\/h4>\n\n\n\n<p>If unsuccessful, for whatever reason, the Video API will return a JSON with a non\u2014zero result code. An error response in JSON will always carry 3 keys, viz. Result Code, Error, Description. See example below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{    \n     \"result\": \"Non-Zero Result Code\",   \n     \"error\": \"Short reason\",\n     \"desc\": \"Descriptive information about the error \/ warning\"\n }<\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4>Result Code Grouping<\/h4>\n\n\n\n<p>The Result Codes of Video API are grouped into 5 categories as shown in the table below <\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Code<\/strong><\/td><td><strong>Category<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>1xx<\/td><td>Information<\/td><td>Request received &amp; processed<\/td><\/tr><tr><td>2xx<\/td><td>Success<\/td><td>Request received &amp; accepted<\/td><\/tr><tr><td>3xx<\/td><td>Redirection<\/td><td>Action required to complete Request<\/td><\/tr><tr><td>4xx<\/td><td>Client Error<\/td><td>Illegible Request Syntax. Can&#8217;t be fulfilled<\/td><\/tr><tr><td>5xx<\/td><td>Server Error<\/td><td>Server failed to complete a legit Request<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 Basic Functions API Host URL Authentication Responses Overview The Video API is for Server to Server calling only. Therefore, the Application Server can only make Video API Call and all&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3711,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ub_ctt_via":""},"featured_image_src":null,"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"featured":false,"featured-large":false},"uagb_author_info":{"display_name":"vcxdevwpadmin","author_link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/author\/vcxdevwpadmin\/"},"uagb_comment_info":0,"uagb_excerpt":"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 Basic Functions API Host URL Authentication Responses Overview The Video API is for Server to&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3712"}],"collection":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/comments?post=3712"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3712\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3711"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=3712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}