Server API

REST API Service to create sessions, to fetch session meta data and recording after completion of the session. REST APIs are called from inside the application servers code which provides RTC services using EnableX platform.

Following are the key points to consider.

  1. Accessible using http-authentication with Application Credentials. Each API Call must be authenticated.
  2. Only Server-to-server call allowed, i.e. API Service can’t be accessed from any web browser.
  3. Using Server API, developer can manage Rooms, create Token, get post conference Call Detail Reports etc.
As only the Server-to-Server calls are allowed, developers must create an Application Server to make API Calls. If an end-point needs to carry out any provisioning tasks, such requests need to be routed to EnableX Server through developers Application Server. The following diagram explains the request and response flow to-from the Client End Point and Server API.

client-server

API Host URL

The Rest API Service, is hosted on the following URL: https://api.enablex.io

All routes of Server API should be mapped to this base URL. However, in case you are given BETA Access, then all API Calls to be made to the following URL: https://api-beta.enablex.io

Authentication

Rest API Service uses HTTP Basic Authentication.

Partners will receive, can generate individual API credentials for each Application they create through on the Partner Portal. Combination of Application ID and Application Key together makesis the API Credential for an App.

For HTTP Basic Authentication, you need to use Application ID as Username and Application Key as Password to form the HTTP Authorization Header.

HTTP Basic Authentication Header example:
Authorization: Basic + base64-encode-of(“Application ID:Application Key”)

API Response

Result Code Grouping

API uses all normalized HTTP Result Codes. Here the summary of errors groups:

Code Information Description
1xx Information Request received, and getting processed.
2xx Success The action was successfully received and accepted.
3xx Redirection Further action must be taken to complete the request.
4xx Client Error The request contains incorrect syntax or cannot be fulfilled.
5xx Server Error The server failed to fulfil an apparently valid request.

Error JSON

All Error conditions met by API will be returned with the following JSON structure. { "result": "A Response Code Number", "error": "Short reason", "desc": "Descriptive information about the error / warning" }

For more details , refer Result-codes

Success JSON

Note that "result" will always be returned with value "0" (Zero) for all successful processes too. { "result": 0, "key1": "value", /* varies as per response */ "key2": }