Querying User Call Metrics
Function
This API is used to query metrics about user call quality.
Data from the past five days can be queried. The value of mid cannot be null. For real-time data queries, the interval between the start time and end time cannot exceed 24 hours. Cross-day queries are supported for single-user data retrieval.
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/client/qos/details
| 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 |
|---|---|---|---|
| domain | No | String | Domain name. |
| app_id | Yes | String | Application ID. |
| room_id | Yes | String | Room ID. |
| user_id | No | String | Queries the user who sends streams. |
| peer_id | No | String | Queries the ID of the user who receives streams. |
| stream_id | No | String | Stream ID |
| direction | No | String | Data direction, which can be uplink or downlink. |
| mid | Yes | Array of strings | Metrics to be queried. If this parameter is set to all, all metrics are returned. Use commas (,) to separate multiple metrics. |
| start_time | Yes | String | Time when the query starts. UTC time in the format of yyyy-mm-ddThh:mm:ssZ, for example, 2020-04-23T06:00:00Z. |
| end_time | Yes | String | Time when the query ends. UTC time in the format of yyyy-mm-ddThh:mm:ssZ, for example, 2020-04-23T07:00:00Z. |
| time_type | No | String | Query time type. stime indicates the database dotting time. If this parameter is not specified, the default value ctime is used. |
| limit | No | Integer | Query result limits. |
| offset | No | Integer | Query offset. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | No | String | User token. This parameter is mandatory when token authentication is used. The token can be obtained by calling the IAM API 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 |
|---|---|---|
| room_id | String | Room ID. |
| data | Array of QosQualityData objects | QoS data. |
| Parameter | Type | Description |
|---|---|---|
| uid | String | User ID. |
| peerid | String | Peer user ID. The value 0 indicates local uplink data. |
| mid | String | Metric ID. |
| data | Array of TimeFloatValueData objects | Timestamp and metric value list at the corresponding time |
| Parameter | Type | Description |
|---|---|---|
| time | String | Sampling time. The format must comply with the ISO 8601 standard (UTC time). The format is YYYY-MM-DDThh:mm:ssZ. |
| value | Float | Timestamp and metric list at the corresponding time. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error message. |
Example Requests
GET /v1/{project_id}/rtc/client/qos/details?app_id=5fa682b34a974f7ad24d223b&room_id=6951a79e9f811ebbd2ac58d7ac82553&mid=appcpu&start_time=2020-04-23T06:00:00Z&end_time=2020-04-23T07:00:00Z Example Responses
Status code: 200
This status code is returned if the request succeeds.
{
"room_id" : "73594089618272256",
"data" : [ {
"uid" : "30617",
"peerid" : "30617",
"mid" : "ajitter",
"data" : [ {
"time" : "2022-06-04T06:06:00Z",
"value" : 433422
}, {
"time" : "2022-06-04T06:00:05Z",
"value" : 433422
} ]
} ]
} Status code: 400
This status code is returned if the request fails.
{
"error_code" : "DATA.100011001",
"error_msg" : "Required String parameter 'app_id' 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