查询当前活跃的房间列表
更新时间:2025-05-07
接口描述
用户根据appId查询房间列表。
请求(Request)
请求URI
JSON
1GET /v1/room/list?appId={appId} HTTP/1.1
参数名 | 类型 | 是否必需 | 描述 |
---|---|---|---|
appId | String | 是 | 应用ID |
orderType | String | 否 | 房间排序方式,按照房间开始时间排序,支持取值 asc/desc,asc 表示升序,desc 表示降序,默认值为asc。 |
请求头域
除公共头域外,无其它特殊头域。
请求体
无
响应(Response)
响应头域
除公共头域外,无其它特殊头域。
响应体
响应体是List类型,List中每个元素结构如下:
参数名 | 类型 | 描述 |
---|---|---|
+appId | String | 应用ID |
+roomName | String | 房间名 |
+roomId | Long | 房间ID |
+startTime | String | 开始时间 |
示例
请求示例
JSON
1GET /v1/room/list?appId=testapp&orderType=desc HTTP/1.1
2host: rtc.baidubce.com
3content-type: application/json
4authorization: {bce-authorization-string}
5x-bce-request-id: {bce-request-id}
响应示例
JSON
1HTTP/1.1 200 OK
2x-bce-request-id: b06a9214-04d6-4a08-9f5d-966b04604cfb
3date: Mon, 05 Sep 2022 03:25:43 GMT
4transfer-encoding: chunked
5content-type: application/json;charset=UTF-8
6cache-control: no-cache
7[
8 {
9 "appId": "testapp",
10 "roomName": "6543211234",
11 "roomId": 883809059995648,
12 "startTime": "2023-03-06 11:15:59"
13 },
14 {
15 "appId": "testapp",
16 "roomName": "6543211234342",
17 "roomId": 887986989236224,
18 "startTime": "2023-03-06 11:01:18"
19 }
20]