提交工单
咨询集成、功能及报价等问题
Lists all rooms created under a project where the room's scheduled start time falls within a certain time period.
Request method: POST
Request endpoint:
Service environment | Rate limit | Endpoint |
---|---|---|
Production | 1 request/second | https://roomkit-api.zego.im/statistic/v2/room/get_project_rooms |
Transmission protocol: HTTPS
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
secret_id | Int64 | Yes | 12580 | The Secret ID assigned to your project by ZEGO. |
access_token | String | Yes | "CIE7hNPK6Y55DeUJBSDrInP" | The server access token obtained via the get_access_token request. |
pid | Int64 | Yes | 1200 | The Product ID assigned to your project by ZEGO. |
begin_timestamp | Int64 | Yes | 1616489840 | Query start time, in seconds. |
end_timestamp | Int64 | No | 1616490214 | Query end time, in seconds. Default value: the current time. |
page_no | Uint32 | No | 1 | The page number indicating which page of the query result is to be returned. Default value: 1. |
page_size | Uint32 | No | 100 | Number of entries per page. Default value: 100. Maximum value: 100. |
begin_timestamp
, end_timestamp
). The query results are sorted and paged in reverse order of the first login time.{
"secret_id": 12580,
"access_token": "access_token",
"pid": 1200,
"begin_timestamp": 1616489840,
"end_timestamp": 1616490214,
"page_no": 0,
"page_size": 10
}
Parameter | Type | Example | Description |
---|---|---|---|
ret | Object | - | The returned status of the request. |
ret.code | Int | 0 | The returned code. |
ret.message | String | "succeed" | The returned message. |
data | Object | - | The returned data of the request. |
data.count | Int64 | 6 | The total number of records in the query time period. |
data.records | Array of Object | [] | Array of the project's room records. |
data.records[0].room_id | String | "123" | Room ID. |
data.records[0].token | String | "123456789" | Room token. |
data.records[0].room_name | String | "Music Class" | Room name. |
data.records[0].host_id | Int64 | 12 | The room host's User ID. |
data.records[0].host_name | String | "Rachel" | The room host's User Name. |
data.records[0].status | Int64 | 1 | Room status. See the room status definitions in the Room Status table below. |
data.records[0].pre_begin_time | Int64 | 1616489835 | Scheduled start time of the room, in seconds. For rooms not managed by ZEGO's room management service, this parameter represents the room creation time. |
data.records[0].pre_end_time | Int64 | 1616489835 | Scheduled end time of the room, in seconds. For rooms not managed by ZEGO's room management service, this parameter is not included in the returned data. |
data.records[0].start_time | Int64 | 1616489835 | Actual start time of the room, in seconds. Returns 0 if not yet started. |
data.records[0].close_time | Int64 | 1616489835 | Actual end time of the room, in seconds. Returns 0 if not yet ended. |
Room status:
Status value | Status description |
---|---|
1 | Not yet started |
2 | In progress |
4 | Ended |
8 | Cancelled |
{
"ret": {
"code": 0,
"message": "succeed"
},
"data": {
"count": 1,
"records": [
{
"room_id": "1234",
"token": "123456789",
"status": 4,
"room_name": "Music Class",
"pre_begin_time": 1616500094,
"host_id": 100062204,
"host_name": "Rachel",
"start_time": 1616500092,
"close_time": 1616500109
}
]
}
}