Querying Real-Time Scale Data Distribution
Function
This API is used to query the statistics on scale-related metrics in a specified dimension. Scale-related data can be ranked based on the number of online users in a specified dimension.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
URI
GET /v1/{project_id}/rtc/realtime/scale/dimension
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| app | Yes | String | Application identifier. |
| room_id | No | String | Room ID. |
| metric | Yes | String | Data type: OnlineUsers: number of online users |
| dimension | Yes | String | Dimension type. |
| time | Yes | String | Query time. UTC time in the format of YYYY-MM-DDThh:mm:ssZ. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | No | String | User token. This parameter is mandatory when token authentication is used. It can be obtained by calling the IAM API that is used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
| Authorization | No | String | Authentication information. This parameter is mandatory when AK/SK-based authentication is used. |
| X-Sdk-Date | No | String | Time when the request is sent. This parameter is mandatory when AK/SK-based authentication is used. |
| X-Project-Id | No | String | Project ID, which is the same as that used in the URI. This parameter is mandatory when AK/SK-based authentication is used. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| X-Request-Id | String | Unique ID of the request. |
| Parameter | Type | Description |
|---|---|---|
| dimensions | Array of RealtimeScaleDimensionValue objects | Dimension distribution information. |
| Parameter | Type | Description |
|---|---|---|
| dimension | String | Dimension value. For example, if the query dimension is region, the value of this parameter may be GD. |
| online_users | Long | Number of online users. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error message. |
Example Requests
GET /v1/{project_id}/rtc/realtime/scale/dimension?app=5fa682b34a974f7ad24d223b Example Responses
Status code: 200
This status code is returned if the request succeeds.
{
"dimensions" : [ {
"dimension" : "GD",
"online_users" : 10
} ]
} Status code: 400
This status code is returned if the request fails.
{
"error_code" : "DATA.100011001",
"error_msg" : "Required String parameter 'app' is not present"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | This status code is returned if the request succeeds. |
| 400 | This status code is returned if the request fails. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot