Help Center/ SparkRTC/ API Reference/ Statistical Analysis/ Querying Historical Quality Data
Updated on 2022-10-08 GMT+08:00

Querying Historical Quality Data

Function

This API is used to query experience data of quality indicators in the last 31 days. You cannot obtain the experience data of the current day.

The maximum query time span is 31 days.

URI

GET /v1/{project_id}/rtc/history/quality

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

app

Yes

String

Application identifier.

metric

Yes

Array

Data type.

  • JoinSuccessRate: success rate of joining a room

  • JoinSuccess5SecsRate: success rate of joining a room in 5 seconds

  • VideoFreezeRate: video freeze rate

  • AudioFreezeRate: audio freeze rate

  • FirstVideoRecvTime: time required for receiving the first video frame

  • FirstAudioRecvTime: time required for receiving the first audio frame

  • PullStreamSuccessRate: stream pulling success rate

  • PushStreamSuccessRate: stream pushing success rate

  • VideoUpstreamExcellentTransRate: uplink high-quality transmission rate of videos on the client

  • AudioUpstreamExcellentTransRate: uplink high-quality transmission rate of audios on the client

  • VideoExcellentTransRate: end-to-end high-quality video transmission rate

  • AudioExcellentTransRate: end-to-end high-quality audio transmission rate

  • VideoTransDelay: end-to-end video latency, in milliseconds. The average latency of all users on a day is used.

  • AudioTransDelay: end-to-end audio latency, in milliseconds. The average latency of all users on a day is used.

start_date

No

String

Time when the query starts. UTC time in the format of YYYY-MM-DD, for example, 2020-04-23. If this parameter is not specified, data of the last day is read by default.

end_date

No

String

Time when the query ends. UTC time in the format of YYYY-MM-DD, for example, 2020-04-23.

Request Parameters

Table 3 Request header 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

Table 4 Response header parameters

Parameter

Type

Description

X-Request-Id

String

Unique ID of the request.

Table 5 Response body parameters

Parameter

Type

Description

quality

Array of RtcHistoryQualityTimeValue objects

Timestamp and indicator value list at the corresponding time

Table 6 RtcHistoryQualityTimeValue

Parameter

Type

Description

date

String

Sampling time. The format must comply with the ISO 8601 standard (UTC time). The format is YYYY-MM-DD.

join_success_rate

Double

Success rate of joining a room. The value 1 indicates that the success rate is 100%.

join_success_in5secs_rate

Double

Success rate of joining a room within 5 seconds. The value 1 indicates that the success rate is 100%.

video_freeze_rate

Double

Video freeze rate. The value 1 indicates that the freeze rate is 100%.

audio_freeze_rate

Double

Audio freeze rate. The value 1 indicates that the freeze rate is 100%.

first_video_recv_time

Long

Time required for receiving the first video frame, in milliseconds.

first_audio_recv_time

Long

Time required for receiving the first audio frame, in milliseconds.

pull_stream_success_rate

Double

Success rate of stream pulling. The value 1 indicates that the success rate is 100%.

push_stream_success_rate

Double

Success rate of stream pushing. The value 1 indicates that the success rate is 100%.

video_upstream_excellent_trans_rate

Double

Uplink high-quality transmission rate of videos on the client. The value 1 indicates that the transmission rate is 100%.

audio_upstream_excellent_trans_rate

Double

Uplink high-quality transmission rate of audios on the client. The value 1 indicates that the transmission rate is 100%.

video_excellent_trans_rate

Double

E2E high-quality video transmission rate. The value 1 indicates that the transmission rate is 100%.

audio_excellent_trans_rate

Double

E2E high-quality audio transmission rate. The value 1 indicates that the transmission rate is 100%.

video_trans_delay

Double

E2E video network latency, in milliseconds. The value is the median of the network latency of all users of the current day.

audio_trans_delay

Double

E2E audio network latency, in milliseconds. The value is the median of the network latency of all users of the current day.

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

GET /v1/{project_id}/rtc/history/quality?app=5fa682b34a974f7ad24d223b&metric=VideoFreezeRate,AudioTransDelay&start_date=2020-04-23&end_date=2020-04-26

Example Responses

Status code: 200

This status code is returned if the request succeeds.

{
  "quality" : [ {
    "date" : "2020-06-04",
    "join_success_rate" : 0.99
  } ]
}

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.