End an active room
Trigger this request to end an active room.
POSThttps://api.100ms.live/v2/active-rooms/<room_id>/end-room
curl --location --request POST 'https://api.100ms.live/v2/active-rooms/<room_id>/end-room' \ --header 'Authorization: Bearer <management_token>' \ --header 'Content-Type: application/json' \ --data-raw '{ "reason": "Class has ended", "lock": false }'
RESPONSE
Status: 200 OK
{ "message": "session is ending" }
Arguments
Name | Type | Description | Required |
---|---|---|---|
room_id — path param | string | Unique identifier of the room you wish to disable. Example: 627cda81ab4f3b56a077dc33 | Yes |
reason — body param | string | Description to indicate the reason for ending the active room. | No |
lock — body param | boolean | Status of the room to be set. Allowed values : true, false. Default : false (ends the current active session only) | No |
Warning: If you set the lock argument to true
, it will end the active room and users will not be able to join the room later as well. You can use enable a room API or dashboard to enable the room again.
Why would you use this API?
- To disconnect all connected peers at a pre-defined timestamp if you wish to add a hard stop for any sessions.
- Use this to allow peers to join the room only once daily for a respective time slot.
- Trigger this API at the end of the session with the lock argument as
true
, - The next day, one minute before the schedule - use the enable a room API to enable the room to allow the users to join the session.
- Trigger this API at the end of the session with the lock argument as
Have a suggestion? Recommend changes ->