{"id":214,"date":"2019-08-28T14:24:56","date_gmt":"2019-08-28T06:24:56","guid":{"rendered":"https:\/\/devcenter.vcloudx.com\/?page_id=214"},"modified":"2025-04-05T02:20:55","modified_gmt":"2025-04-04T18:20:55","slug":"server-api","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video\/server-api\/","title":{"rendered":"Video API for Video Application Server"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote\"><p>Video API, a RESTful API Service, is the single entry point to access the services. The Video API is used for provisioning, requesting token to start WebRTC session and for post-session reporting.<\/p><\/blockquote>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\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>Only the Application Server may call the Video API. <\/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-1.png\" alt=\"\" class=\"wp-image-7337\" srcset=\"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-content\/uploads\/2025\/04\/server-api-1-1.png 684w, https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-content\/uploads\/2025\/04\/server-api-1-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 the 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-1.png\" alt=\"\" class=\"wp-image-7339\" srcset=\"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-content\/uploads\/2025\/04\/server-api-2-1.png 998w, https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-content\/uploads\/2025\/04\/server-api-2-1-300x71.png 300w, https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-content\/uploads\/2025\/04\/server-api-2-1-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>Create Room to carry out RTC Session<\/li><li>Update Room Information<\/li><li>Delete Room<\/li><li>Get list of Rooms of your Application<\/li><li>Get Room Information<\/li><\/ul>\n\n\n\n<p><strong>Transactional Tasks<\/strong><\/p>\n\n\n\n<ul><li> Create Token to Join a Session <\/li><\/ul>\n\n\n\n<p><strong>Post Session Reporting<\/strong><\/p>\n\n\n\n<ul><li>Get Call Detail Report (CDR)<\/li><li> Get access to Recording, Transcoded Video, Chat Script files <\/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.yourcpass.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.yourcpass.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.yourcpass.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.yourcpass.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 the 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<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Video API, a RESTful API Service, is the single entry point to access the services. The Video API is used for provisioning, requesting token to start WebRTC session and for post-session reporting. Table of Contents Overview Basic Functions API Host URL Authentication Responses Overview Only the Application Server may call the Video API. Some applications may require a provisioning request from the Client End Point using your own service API.&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":17,"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":"Video API, a RESTful API Service, is the single entry point to access the services. The Video API is used for provisioning, requesting token to start WebRTC session and for post-session reporting. Table of Contents Overview Basic Functions API Host URL Authentication Responses Overview Only the Application Server may call the Video API. Some applications&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/214"}],"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=214"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/214\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/17"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}