你可以使用此接口查询一段时间内,某个应用的音视频通话实时质量指标数据。
若要查询地域分布、设备平台、网络类型等维度的实时质量数据,建议调用 ListRealTimeQualityDistribution 接口。
可以调用 ListRealTimeQuality 接口,指定你所属的 AppId,指标类型和查询时间段,查询该时间段内指标的数据。
| 限制类别 | 调用频率限制 |
|---|---|
| 最大请求次数 | |
| 最远可查询时间 | 60 分钟 |
| 最大单次查询时间跨度 | 60 分钟 |
| 数据延迟 | 1 分钟 |
关于调用接口的服务地址、通信协议、字符编码和签名机制,参看调用OpenAPI。
使用 POST 方式发起请求。
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | ListRealTimeQuality | 接口名称,本接口取值:ListRealTimeQuality |
| Version | String | 是 | 2020-12-01 | 接口版本,本接口取值:2020-12-01 |
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| AppId | String | 是 | Your_AppId | 你的音视频应用的唯一标志。 |
| StartTime | String | 是 | 2021-07-24T00:00:00+08:00 | 查询起始时间戳,格式为 RFC3339,单位为秒。 |
| EndTime | String | 是 | 2021-07-24T00:10:00+08:00 | 查询结束时间戳,格式为 RFC3339,单位为秒。 |
| Indicator | Array of String | 是 | ["stall_rate","join_room_success_rate"] | 查询的指标名称。可同时查询多个指标。Indicator 可选值,参看质量数据相关 indicator。 |
| RoomId | String | 否 | Your_RoomId | 房间 ID,是房间的唯一标志。如果不填,代表查询该 AppId 的整体实时指标。 |
| UserId | Array of String | 否 | ["user1","user2"] | 查询的用户 ID 列表,最多可以指定 20 个。值不合法时默认剔除。此字段仅在 RoomID 不为空时生效。 |
Query
https://rtc.volcengineapi.com?Action=ListRealTimeQuality&Version=2020-12-01
postscriptBody
{
"AppId" : "Your_AppId",
"StartTime" : "2021-07-24T00:00:00+08:00",
"EndTime" : "2021-07-24T00:10:00+08:00",
"Indicator":["stall_rate","join_room_success_rate"],
"RoomId":"Your_RoomId",
"UserId":["user1","user2"]
}
json返回结果参看 BaseResponse。 其中 Result 的结构如下:
| 参数名 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| RoomId | String | Your_RoomId | 房间 ID |
| UserId | Array of String | ["user1","user2"] | 用户 ID |
| Indicators | Array of Indicator | 具体指标数据 |
Indicator
| 参数名 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| Name | string | 5s_join_room_success_rate | 指标名称 |
| Unit | string | % | 指标的单位 |
| Data | Array of DataItem | 具体的指标值以及对应时间 |
DataItem
| 参数名 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| TimeStamp | string | 2021-07-24T00:00:00+08:00 | 指标聚合时间,即指标值对应时间段的开始时刻(每 30s 一聚合)。格式为 RFC3339 规范。 |
| Value | double | 99.99 | 指标值,浮点数,保留两位小数。 |
{
"ResponseMetadata":{
"RequestId":"Your_RequestId",
"Action":"ListRealTimeQuality",
"Version":"2020-12-01",
"Service":"rtc",
"Region":"cn-north-1"
},
"Result":{
"RoomId":"Your_RoomId",
"UserId":["user1","user2"],
"Indicators":[
{
"Name":"5s_join_room_success_rate",
"Unit":"%",
"Data":[
{
"TimeStamp":"2021-07-24T00:00:00+08:00",
"Value":98.68
},
{
"TimeStamp":"2021-07-24T00:00:30+08:00",
"Value":98.20
}
{
"TimeStamp":"2021-07-24T00:01:00+08:00",
"Value":98.30
}
]
},
{
"Name":"10s_join_room_success_rate",
"Unit":"%",
"Data":[
{
"TimeStamp":"2021-07-24T00:00:00+08:00",
"Value":99.68
},
{
"TimeStamp":"2021-07-24T00:00:30+08:00",
"Value":99.20
}
{
"TimeStamp":"2021-07-24T00:01:00+08:00",
"Value":99.40
}
]
}
]
}
}
json