Room
Note: The Legacy API (V1) will remain fully functional. However, we recommend you use our new API to leverage the new functionalities and features and stay up to date with future releases; you can continue to check the docs for the Legacy API (V1)s here.
Create Room using API
You can create room using API. This provides a more scalable way of creating room.
curl https://prod-in2.100ms.live/api/v2/rooms -H 'Authorization: Bearer <management_token>' -X POST -H 'Content-Type: application/json' -d '{"name": "test-room", "description": "This is a test room", "recording_info": {"enabled": true, "upload_info": {"type": "s3", "location": "test-bucket", "prefix": "test-prefix", "options": {"region": "ap-south-1"}, "credentials": {"key": "aws-access-key", "secret": "aws-secret-key"}}}}'
Headers
Name | Value | Required |
---|---|---|
Content-type | application/json | Yes |
Authorization | Bearer <management token> | Yes |
Body Paramters
Name | Type | Description | Required |
---|---|---|---|
name | string | A unique identifier you can assign to 100ms rooms. This is case-insensitive . Accepted characters are a-z, A-Z, 0-9, and . - : _ . If not provided, this is generated automatically. Note: (1) If create room is called with an existing room name, then the corresponding room ID is returned (2) Providing room name will be helpful if you want to disable the room later (disable room API requires room name) | No |
description | string | A string to describe your room's usage. E.g. "9PM English Class Batch 2" | No |
template | string | Template of the room. You can get template name from room details section on dashboard | No |
recording_info | object | Object of type recording_info . This object contains information for enabling recording/setting storage location for recordings. | No |
region | string | Region in which you want to create a room. eu - European Union in - India us - United States auto Fallback to region of the template (default value) | No |
recording_info
Name | Type | Description | Required |
---|---|---|---|
enabled | boolean | Enable SFU recording. Disabled by default | No |
upload_info | object | Object of type upload_info . This object contains information on recordings storage location. If you want to store recording with 100ms, and not use your own s3, don't add this to the object | No |
recording_info
in room acts as an atomic property. Following describes the way recording_info
depends on recording settings defined in a template.
- If
recording_info
key is not provided in the api, the room will fill it with recording settings from template. And the response body will includerecording_source_template: true
. This means, whenever recording info is changed in template, they will also be reflected in room's recording settings. - If
recording_info
key is provided in the api, the room's recording settings will not depend on template at all.
To know more about recording please visit Recording
upload_info
Name | Type | Description | Required |
---|---|---|---|
type | string | Upload Destination type. Currently, only s3 is supported | Yes |
location | string | Name of the AWS s3 bucket in which you want to store all recordings | Yes |
prefix | string | Upload prefix path | No |
options | object | Additional configurations of type Options to be used for uploading | No |
credentials | object | Object of type Credentials . This is used to share AWS credentials to access the s3 bucket specified. | No |
Options
Name | Type | Description | Required |
---|---|---|---|
region | string | Region of the AWS account hosting the s3 bucket for storing recordings. If not provided it is assumed to be ap-south-1 | No |
Credentials
Name | Type | Description | Required |
---|---|---|---|
key | string | access key ID for the AWS account hosting the s3 bucket for storing recordings | Yes |
secret | string | secret access key for the AWS account hosting the s3 bucket for storing recordings | Yes |
The access keys should have read(GetObject) and write(PutObject) permissions for the s3 bucket. For more details check - https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html
Disable Room
This API can be used to disable a room from further use
curl https://prod-in2.100ms.live/api/v2/rooms -H 'Authorization: Bearer <management_token>' -X POST -H 'Content-Type: application/json' -d '{"name": "test-room", "active": false}'
Headers
Name | Value | Required |
---|---|---|
Content-type | application/json | Yes |
Authorization | Bearer <management token> | Yes |
Body Paramters
Name | Type | Description | Required |
---|---|---|---|
name | string | Room name as given during creation of the room | Yes |
active | bool | Flag to indicate disabling of the room, should be set to false | Yes |