Query User Pull Stream Quality and Performance Details
Description
This interface can be used to query the pull stream quality and device performance based on the user ID, time period, room ID, and stream ID.
Request method and endpoint
- Request method: GET
- Request URL:
https://analytics-api.zego.im/?Action=GetPlayQualityDetail - Transfer protocol: HTTPS
- QPS limit (same AppID): 3 times/second, 10000 times/day
Request parameters
The following request parameter list only lists the interface request parameters and some common parameters. Please refer to Accessing Server APIs - Public Request Parameters for the complete common parameter list.
| Parameter | Type | Required | Description |
|---|---|---|---|
| RoomId | String | Yes | Room ID. |
| UserId | String | Yes | User ID. |
| StreamId | String | Yes | Stream ID. |
| Metrics[] | Array of String | Yes | The list of metrics to be queried, please refer to Pull Stream Quality Indicator Description for details. |
| StartTs | Number | Yes | Start time, UTC timestamp in milliseconds. |
| EndTs | Number | Yes | End time, UTC timestamp in milliseconds. If the push stream is not ended, it can be represented as 0 or the current timestamp to indicate in progress. |
Pull Stream Quality Indicator Description
| Indicator Name | Field Name | Data Type | Remark |
|---|---|---|---|
| Audio Bitrate | audio_bitrate | Int | Unit: Kbps |
| Audio Network FPS | audio_network_fps | Float | Unit: fps |
| Audio Break Percentage | audio_break_percentage | Float | Range: 0-100 |
| Video Bitrate | video_bitrate | Float | Unit: Kbps |
| Video Network FPS | video_network_fps | Float | Unit: fps |
| Video Break Percentage | video_break_percentage | Float | Range: 0-100 |
| Decode Resolution | decode_resolution | String | Format: Width*Height |
| Peer to Peer Delay | peer_to_peer_delay | Float | Unit: ms |
| Peer to Peer PLR | peer_to_peer_plr | Int | Range: 0-100 |
| Downlink Delay | downlink_delay | Int | Unit: ms |
| Downlink Packet Loss Rate | downlink_packet_loss_rate | Int | Range: 0-100 |
| Rendered Sound Level | rendered_sound_level | Int | Range: 0-100 |
| Audio MOS Score | mos | Float | Range: 0-5
|
| System Memory Usage | sys_mem_used | Int | Unit: MB |
| App Memory Usage | app_mem_used | Int | Unit: MB |
Request Example
https://analytics-api.zego.im/?Action=GetPlayQualityDetail
&RoomId=room
&UserId=userA
&StreamId=streamA
&Metrics[]=audio_bitrate
&Metrics[]=downlink_delay
&StartTs=1672565276000
&EndTs=1672565456000
&<Public Request Parameters>Response Parameters
| Parameter | Type | Description |
|---|---|---|
| Code | Number | Return code. |
| Message | String | Operation result description. |
| RequestId | String | Request ID. |
| Data | Object | Response data. |
| └Metrics | Array of Object | Metric list. |
| └Metric | String | Metric name. |
| └Values | Array of Object | Metric value list. |
| └Value | See Pull Stream Quality Indicator Description | Metric value. |
| └Timestamp | Number | UTC timestamp, unit: milliseconds. |
Response Example
{
"Code": 0,
"Data": {
"Metrics": [
{
"Metric": "audio_bitrate",
"Values": [
{
"Timestamp": 1659411660000,
"Value": 0
},
{
"Timestamp": 1659411720000,
"Value": 0
},
{
"Timestamp": 1659411780000,
"Value": 0
},
{
"Timestamp": 1659411840000,
"Value": 0
},
{
"Timestamp": 1659411900000,
"Value": 0
}
]
}
]
},
"Message": "success",
"RequestId": 1659512998878671000
}Return Code
| Return Code | Description | Action |
|---|---|---|
| 0 | Success. | - |
| 500 | Interface error. | Contact ZEGOCLOUD Technical Support. |
| 10001 | Parameter format error. | Check parameters. |
| 10002 | Parameter error or parameter invalid. | Check parameters. |
| 30002 | Interface request frequency exceeds the limit. | Please confirm the QPS limit of the corresponding interface and reduce the request frequency. |
