你可以使用此接口查询一段时间内,某个应用的音视频通话实时运营数据。
可以调用 ListRealTimeOperationData 接口,指定你所属的 AppId,指标类型和查询时间段,查询该时间段内指标的数据。
关于调用接口的服务地址、通信协议、字符编码和签名机制,参看调用OpenAPI。
| 限制类别 | 调用频率限制 |
|---|---|
最大请求次数 |
|
| 最远可查询时间 | 60 分钟 |
| 最大单次查询时间跨度 | 60 分钟 |
| 数据延迟 | 20 秒 |
使用 POST 方式发起请求。
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | ListRealTimeOperationData | 接口名称,本接口取值:ListRealTimeOperationData |
| 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:01:00+08:00 | 查询结束时间戳,格式为 RFC3339,单位为秒。 |
| Indicator | Array of String | 是 | ["online_user_count","online_room_count"] | 查询的指标名称。可同时查询多个指标。 Indicator 可选值,参看实时运营数据相关 indicator。 |
https://rtc.volcengineapi.com?Action=ListRealTimeOperationData&Version=2020-12-01
postscript{
"AppId" : "Your_AppId",
"StartTime" : "2021-07-24T00:00:00+08:00",
"EndTime" : "2021-07-24T00:01:00+08:00",
"Indicator":["online_user_count","online_room_count"]
}
json返回结果参看 BaseResponse。
其中 Result 的结构如下:
| 参数名 | 类型 | 描述 |
|---|---|---|
| Indicators | Array of Indicator | 具体指标数据 |
Indicator
| 参数名 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| Name | string | online_user_count | 指标名称 |
| Data | Array of DataItem | 具体的指标值以及对应时间 |
DataItem
| 参数名 | 类型 | 描述 |
|---|---|---|
| Timestamp | String | 指标聚合时间,即指标值对应时间段的开始时刻(每 30s 一聚合)。格式为 RFC3339 规范。 |
| Value | float | 指标数值,浮点数,保留两位小数。 |
{
"ResponseMetadata":{
"RequestId":"Your_RequestId",
"Action":"ListRealTimeOperationData",
"Version":"2020-12-01",
"Service":"rtc",
"Region":"cn-north-1"
},
"Result":{
"Indicators":[
{
"Name":"online_user_count",
"Data":[
{
"TimeStamp":"2021-07-24T00:00:00+08:00",
"Value":3212
}
{
"TimeStamp":"2021-07-24T00:00:30+08:00",
"Value":3211
}
{
"TimeStamp":"2021-07-24T00:01:00+08:00",
"Value":3210
}
]
},
{
"Name":"online_room_count",
"Data":[
{
"TimeStamp":"2021-07-24T00:00:00+08:00",
"Value":1231
}
{
"TimeStamp":"2021-07-24T00:00:30+08:00",
"Value":1232
}
{
"TimeStamp":"2021-07-24T00:01:00+08:00",
"Value":1233
}
]
}
]
}
}
json