Help Center/ SparkRTC/ API Reference/ Statistical Analysis/ Querying User Call Indicators
Updated on 2022-10-08 GMT+08:00

Querying User Call Indicators

Function

This API is used to query the call quality indicators of a user.

Data of the last five days can be queried. The value of mid cannot be null. When real-time data is queried, the interval between the start time and end time cannot exceed 24 hours. Cross-day query is supported for query data of a single user.

URI

GET /v1/{project_id}/rtc/client/qos/details

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

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

Indicators to be queried. If this parameter is set to all, all indicators are returned. Use commas (,) to separate multiple indicators.

  • appcpu: CPU usage of a device app

  • syscpu: CPU usage of the device system

  • abit: audio bit rate on the device, in kbit/s

  • vbit: video bit rate on the device, in kbit/s

  • dbit: presentation bit rate on the device, in kbit/s

  • vfps: video frame rate on the device, in FPS

  • dfps: presentation frame rate on the device, in FPS

  • vblock: video freeze rate on the device (Video freeze is counted when the freeze duration reaches 600 ms.)

  • dblock: presentation freeze rate on the device (Presentation freeze is counted when the freeze duration reaches 600 ms.)

  • aloss: audio packet loss rate on the device

  • vloss: video packet loss rate on the device

  • dloss: presentation packet loss rate on the device

  • vwidth: video resolution width on the device

  • vheight: video resolution height on the device

  • dwidth: presentation resolution width on the device

  • dheight: presentation resolution height on the device

  • ajitter: audio jitter rate on the device

  • artt: audio latency on the device

  • vjitter: video jitter rate on the device

  • vrtt: video latency on the device

  • djitter: presentation jitter rate on the device

  • drtt: presentation latency on the device

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

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

room_id

String

Room ID.

data

Array of QosQualityData objects

QoS data.

Table 6 QosQualityData

Parameter

Type

Description

uid

String

User ID.

peerid

String

Peer user ID. The value 0 indicates local uplink data.

mid

String

Indicator ID.

data

Array of TimeFloatValueData objects

Timestamp and indicator value list at the corresponding time

Table 7 TimeFloatValueData

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 indicator list at the corresponding time.

Status code: 400

Table 8 Response body parameters

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.