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:
Untitled
https://zim-api.zego.im/?Action=QueryRoomAttribute
&<Common request parameters>
1
- Request body:
Untitled
{
"RoomId": "room123",
"FromUserId": "fromUserId"
}
1
Response parameters
The response parameters are as follows:
Parameter | Type | Required | Description |
---|---|---|---|
Code | int32 | Yes | Return status code (0 means success). |
Message | string | Yes | Return status information. |
RequestId | string | Yes | Request unique identifier. |
AttributeSeq | Number | Room attribute seq. | |
Attributes | Array of RoomAttribute | Room attribute list. |
RoomAttribute structure:
Parameter | Type | Description |
---|---|---|
Key | String | Room attribute key value. |
Value | String | Room attribute value value. |
AutoDelete | Number | Whether to automatically delete. |
Response example
Untitled
{
"Code": 0,
"Message": "success",
"RequestId": "req-123456789",
"AttributeSeq":10,
"Attributes": [
{
"Key": "1",
"Value": "attr1",
"AutoDelete":0,
},
{
"Key": "2",
"Value": "attr1",
"AutoDelete":0,
}
]
}
1
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. |