logo
On this page

Query User Push Stream Quality and Performance Details


Description

This interface can be used to query the push 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=GetPublishQualityDetail
  • 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.

ParameterTypeRequiredDescription
RoomIdStringYesRoom ID.
UserIdStringYesUser ID.
StreamIdStringYesStream ID.
Metrics[]Array of StringYesThe list of metrics to be queried, please refer to Push Stream Quality Indicator Description for details.
StartTsNumberYesStart time, UTC timestamp in milliseconds.
EndTsNumberYesEnd 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.

Push Stream Quality Indicator Description

Indicator NameField NameData TypeRemark
Video Bitratevideo_bitrateIntUnit: Kbps
Audio Bitrateaudio_bitrateIntUnit: Kbps
Video Network FPSvideo_network_fpsFloatUnit: fps
Audio Network FPSaudio_network_fpsFloatUnit: fps
Video Capture FPSvideo_capture_fpsFloatUnit: fps
Uplink Delayuplink_delayIntUnit: ms
Uplink Packet Loss Rateuplink_packet_loss_rateIntRange: 0-100
Captured Sound Levelcaptured_sound_levelIntRange: 0-100
Encode Resolutionencode_resolutionStringFormat: Width*Height
System CPU Usagesys_cpu_usedIntRange: 0-100
App CPU Usageapp_cpu_usedIntRange: 0-100
System Memory Usagesys_mem_usedIntUnit: MB
App Memory Usageapp_mem_usedIntUnit: MB

Request Example

https://analytics-api.zego.im/?Action=GetPublishQualityDetail
&RoomId=room
&UserId=userA
&StreamId=streamA
&Metrics[]=video_bitrate
&StartTs=1672565276000
&EndTs=1672565456000
&<Public Request Parameters>

Response Parameters

ParameterTypeDescription
CodeNumberReturn code.
MessageStringOperation result description.
RequestIdStringRequest ID.
DataObjectResponse data.
└MetricsArray of ObjectMetric list.
  └MetricStringMetric name.
  └ValuesArray of ObjectMetric value list.
    └ValueSee Push Stream Quality Indicator DescriptionMetric value.
    └TimestampNumberUTC timestamp in milliseconds.

Response Example

{
    "Code": 0,
    "Data": {
        "Metrics": [
            {
                "Metric": "video_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 CodeDescriptionAction
0Success.-
500Interface error.Contact ZEGOCLOUD Technical Support.
10001Parameter format error.Check parameters.
10002Parameter error or parameter invalid.Check parameters.
30002Interface request frequency exceeds the limit.Please confirm the QPS limit of the corresponding interface and reduce the request frequency.

Previous

Query User Push and Pull Stream Basic Information

Next

Query User Pull Stream Quality and Performance

On this page

Back to top