100ms Logo

100ms

Docs

Search docs
/

Request/Response

Request

Our REST APIs enable you to access various capabilities to complete your integration based on the requirements for your use case.

BaseURIhttps://api.100ms.live/v2/

You can leverage these requests using the common HTTP methods:

  1. GET - retrieves data from 100ms server. Example: Retrieve details of a specific room
  2. POST - sends new data to 100ms server. Example: Create a room
  3. DELETE - removes existing data from 100ms server. Example: Delete a role from a template.

Content type

The input of the request should be of the type application/json. The payload for all POST requests should be passed as a JSON object with the Content-Type as application/json.

Most of the GET request arguments must be passed as a path param whereas some of the APIs accept it as a query param.

DELETE request arguments should be passed as a path param.

Headers

NameValueRequired
Content-type
application/jsonYes
Authorization
Bearer <management token>Yes

Response

100ms API responds to all requests with a response in JSON format along with an HTTP status code to indicate whether the request was successful.

HTTP status codes

All requests return one of these standard HTTP status codes

CodeDescription
200 - OKThe request has succeeded.
204 - No ContentResource deleted.
401 - UnauthorizedNo valid API management token provided.
403 - ForbiddenThe API management token provided doesn't have enough permission.
404 - Not FoundThe request resource was not found.
500 - Server ErrorSomething went wrong with 100ms servers. (These are rare).

Errors

  • API responses with 4XX and 5XX HTTP status codes indicate that the request has failed.

  • 4XX: This can be either 401 or 403 or 404. You can refer to the status codes section for more information. Also, the response body will contain the error message that will help to resolve the error and resend the request.

    Example:

    { "code": 404, "message": "Error: Room not found", "data": { "description": "Error: Room not found" } }
  • 5XX: Server errors. This happens when something is wrong with 100ms servers(these are rare).

Pagination

All API resources support bulk fetches via “list” API methods (For example, list all rooms). These APIs use query parameters - limit, start, and last - to support pagination.

To fetch the first page of 10 objects, set limit=10 as a query param. This API will respond with a list of objects in key data. The response also has key last with the unique identifier for the last object in data.

To fetch the second page of 10 objects (11 to 20), pass the previous last value as the start query param. Set limit = 10 and start = &lt;last value from previous response&gt;.

List API response variables

NameTypeDescription
limit
intNumber of objects the API tried to find. If returned array has lesser number of results, only those number were found.
data
arrayArray of objects.
last
ObjectIDThe last object in the list of objects in the response. Can be used as start for subsequent request.

Params used for pagination

NameTypeDescription
limitintA limit on the number of objects to be returned.
Default value: 10
Allowed range: 10-100
startobjectDetermines the starting point in the list of objects to be returned in the response.

Have a suggestion? Recommend changes ->

Run in postman

Was this helpful?

1234