调用 DescribeLiveStreamUsageData
接口,查询指定时间流和协议维度的带宽、在线人数和请求数数据。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeLiveStreamUsageData | 接口名称。当前 API 的名称为 DescribeLiveStreamUsageData 。 |
Version | String | 是 | 2023-01-01 | 接口版本。当前 API 的版本为 2023-01-01 。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Domain | String | 否 | example.com | 域名。 |
StreamName | String | 否 | stream001 | 流名称。 |
QueryTime | String | 否 |
| 查询时间,格式为 yyyy-mm-dd HH:MM。 例如:查询时间 2023-01-01 10:00 时表示查询时间范围为 10:00 到 10:01。 说明
|
下表仅列出本接口特有的返回参数。更多信息请见返回结构。
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Status | Integer |
| 请求状态:
|
Result | String |
| 请求失败原因:
|
Response | Object of Response | - | 响应数据。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
QueryTime | String | 2022-04-13 10:00 | 查询时间。 |
RequestId | String | k54e3deb-f318-****-8a68-3c959642f9ec | 请求 ID。 |
DataInfoList | Array of DataInfoList | - | 详细数据信息。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Bandwidth | Integer | 20 | 带宽,单位 kbps。 |
Protocol | String | P2p | 协议。 |
Request | Integer | 10 | 请求数。 |
OnlineUser | Integer | 10 | 在线人数。 |
Domain | String | example.com | 域名 |
StreamName | String | test | 流名称。 |
GET https://live.volcengineapi.com?Action=DescribeLiveStreamUsageData&Version=2023-01-01 { "Domain": "example.com", "QueryTime": "2022-04-13 10:00" }
{ "Status": 0, "Result": "", "Response": { "QueryTime": "2021-04-13 00:00", "DataInfoList": [ { "StreamName": "stream001", "Domain": "example.com", "Bandwidth": 12, "Protocol": "Hls", "Request": 10, "OnlineUser": 20 }, { "StreamName": "stream001", "Domain": "example.com", "Bandwidth": 12, "Protocol": "Flv", "Request": 10, "OnlineUser": 20 } ], "RequestId": "k54e3deb-f318-****-8a68-3c959642f9ec" } }
下表仅列出本接口特有的错误码。更多信息请参见公共错误码获取详细信息。
状态码 | 错误码 | 错误信息 | 说明 |
---|---|---|---|
400 | InvalidParam | - | 输入的参数无效或不符合要求,请参照请求参数说明进行检查。 |
403 | RequestForbidden | - | 请求被拒绝,当前账号下无请求的资源(域名空间、域名、应用、配置模版、证书)。 |
500 | InternalError | an internal error occurred, please contact the administrator. | 出现内部错误,请联系技术支持。 |