Query room attributes
Description
Query all room attributes of the specified room ID.
Request method and endpoint
- Request method: POST
- Request URL:
https://zim-api.zego.im/?Action=QueryRoomAttribute - Transmission protocol: HTTPS
- QPS limit: 20 requests/second
Request parameters
The following table describes only the operation-specific request parameters and some common request parameters. For the complete list of common request parameters, see the Common request parameters section of the Accessing Server APIs topic.
| Parameter | Type | Required | Description |
|---|---|---|---|
| FromUserId | String | Yes | The operator, which needs to be in the registered state. This user will not be automatically added to the room. Only numbers, English characters, '!', '#', '$', '%', '&', '(', ')', '+', '-', ':', ';', '<', '=', '.', '>', '?', '@', '[', ']', '^', '_', ' ', ', ', '|', '~' are supported. |
| RoomId | String | Yes | Room ID. Only numbers, English characters, '!', '#', '$', '%', '&', '(', ')', '+', '-', ':', ';', '<', '=', '.', '>', '?', '@', '[', ']', '^', '_', ' ', ', ', '|', '~' are supported. |
Request example
- Request URL:
https://zim-api.zego.im/?Action=QueryRoomAttribute
&<Common request parameters>- Request body:
{
"RoomId": "room123",
"FromUserId": "fromUserId"
}Response parameters
The response parameters are as follows:
| Parameter | Type | Description |
|---|---|---|
| Code | int32 | Return status code (0 means success). |
| Message | string | Return status information. |
| RequestId | string | Request unique identifier. |
| AttributeSeq | int32 | The sequence number of the room attribute. |
| Attributes | Array of RoomAttribute | Room attribute list. |
RoomAttribute structure:
| Parameter | Type | Description |
|---|---|---|
| Key | String | Room attribute key value. |
| Value | String | Room attribute value value. |
| Seq | int32 | The sequence number of the Key in the room. |
| AutoDelete | Number | Whether to automatically delete. |
Response example
{
"Code": 0,
"Message": "success",
"RequestId": "req-123456789",
"AttributeSeq":10,
"Attributes": [
{
"Key": "1",
"Value": "attr1",
"Seq": 9,
"AutoDelete":0,
},
{
"Key": "2",
"Value": "attr1",
"Seq": 10,
"AutoDelete":0,
}
]
}Return codes
The following return codes are only listed for interface business logic. For the complete list of return codes, see Global return codes.
| Return code | Description | Solution |
|---|---|---|
| 660000002 | Parameter error. | Please check the parameters. |
| 660300005 | Frequency limit. | Please try again later. |

