logo
On this page

Query User Push and Pull Stream Basic Information


Description

This interface can be used to query the basic information related to the specified room ID and stream ID of the user within the specified time period.

Request method and endpoint

  • Request method: GET
  • Request URL: https://analytics-api.zego.im/?Action=GetStreamBaseInfo
  • 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.
StreamTypeStringYesThe type of the stream:
  • publish: Push stream.
  • play: Pull stream.
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.

Request Example

https://analytics-api.zego.im/?Action=GetStreamBaseInfo
&RoomId=room
&UserId=userA
&StreamId=streamA
&StreamType=publish
&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, possible values:
  • isp: ISP.
  • net_type: Network type.
  • os_type: Device type.
  • device_model: Device name.
  • sdk_version: SDK version.
  • region: Country or region.
  └ValuesArray of ObjectMetric value list.
    └ValueStringMetric value.
When Metric is net_type, this field is fixed as follows:
  • 2G: 2G network.
  • 3G: 3G network.
  • 4G: 4G network.
  • 5G: 5G network.
  • WIFI: Wireless network.
  • LINE: Wired network.
  • NONE: No network connection.
  • UNKNOWN: Network type not recognized.
When Metric is other values, this field is not fixed.
    └TimestampNumberUTC timestamp in milliseconds.

Response Example

{
    "Code": 0,
    "Message": "success",
    "Data": {
        "Metrics": [
            {
                "Metric": "net_type",
                "Values": [
                    {
                        "Timestamp": 1660634097767,
                        "Value": "WIFI"
                    }
                ]
            }
        ]
    },
    "RequestId": 1660645050860325000
}

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

Access Server APIs

Next

Query User Push Stream Quality and Performance

On this page

Back to top