You need to enable JavaScript to run this app.
导航

查询拉流转推带宽用量

最近更新时间2023.10.12 17:39:59

首次发布时间2022.07.08 13:48:55

查询一定时间范围内,直播拉流转推至第三方的带宽用量。

说明

该接口属于历史版本 API,我们计划于 2023 年 12 月 25 日停止对其进行维护,并于 2024 年 3 月 25 日下线文档,建议您使用新版查询拉流转推带宽用量接口。

注意事项

  • 请求频率:单用户请求频率限制为 100QPS
  • 数据延迟:数据延迟为 15 分钟

请求说明

  • 请求方式:POST
  • 请求地址:https://live.volcengineapi.com?Action=DescribePullToPushBandwidthData&Version=2020-08-01

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数

Query

参数类型是否必选示例值描述
ActionStringDescribePullToPushBandwidthData接口名称。当前 API 的名称为 DescribePullToPushBandwidthData
VersionString2020-08-01接口版本。当前 API 的版本为 2020-08-01

Body

参数类型是否必选示例值描述
DomainListArray of String["example.com"]推流域名列表,缺省情况表示当前账号下的所有域名
StartTimeString2021-04-13T00:00:00+08:00查询的起始时间,起始时间应早于当前时间,RFC3339 格式的 UTC 时间,精度为 s,例如,2022-04-13T00:00:00+08:00
EndTimeString2021-04-14T00:00:00+08:00查询的结束时间,结束时间需晚于起始时间 StartTime,RFC3339 格式的 UTC 时间,精度为 s,例如,2022-04-14T00:00:00+08:00

Aggregation

Integer

300

时间粒度,单位为 s,默认值为 300。

  • 300:支持单次查询时间跨度为 31 天,历史查询时间范围为 93 天;
  • 3600:支持单次查询时间跨度为 93 天,历史查询时间范围为 93 天;
  • 86400:支持单次查询时间跨度为 366 天,历史查询时间范围为 366 天。

DstAddrTypeList

Array of String

["live","Third"]

推流地址类型。缺省情况下表示查询Third。支持 2 种取值。

  • Live:非第三方;
  • Third:第三方。

ShowDetail

Boolean

true

是否展示过滤字段和时间聚合后的详细数据,默认值为 false。

  • false:不展示;
  • true:展示。

返回参数

下表仅列出本接口特有的返回参数。更多信息请见返回结构

参数类型示例值描述
DomainListArray of String["example.com"]域名列表
StartTimeString2021-04-13T00:00:00+08:00查询的起始时间
EndTimeString2021-04-14T00:00:00+08:00查询的结束时间
AggregationInteger300时间粒度

DstAddrTypeList

Array of String

["live","Third"]

推流地址类型。

  • Live:非第三方;
  • Third:第三方。

ShowDetail

Boolean

true

是否展示过滤字段和时间聚合后的详细数据,默认值为 false。

  • false:不展示;
  • true:展示。
PeakUpBandwidthFloat12.0转推带宽峰值,单位为 Mbps
BandwidthDataListArray of BandwidthData-所有时间粒度数据

BandwidthDetailDataList

Array of BandwidthDetailData

-

过滤字段和时间聚合后的数据

说明

请求时,DomainListDstAddrTypeList 至少有一个参数传入了多个值时,会返回该参数;否则不返回该参数。

BandwidthData

参数类型示例值描述
TimeStampString2022-04-13T00:00:00+08:00时间片起始时刻。RFC3339 格式的 UTC 时间,精度为 s,例如,2022-04-13T00:00:00+08:00
UpBandwidthFloat12.0转推带宽,单位为 Mbps

BandwidthDetailData

参数类型示例值描述
DomainStringexample.com域名

DstAddrType

String

Live

推流地址类型。

  • Live:非第三方;
  • Third:第三方。
PeakUpBandwidthFloat12.0转推带宽峰值,单位为 Mbps
BandwidthDataListArray of BandwidthData-所有时间粒度数据

示例

请求示例

POST https://live.volcengineapi.com?Action=DescribePullToPushBandwidthData&Version=2020-08-01
{
  "DomainList": [
    "example.com"
  ],
  "DstAddrTypeList": [
    "live",
    "Third"
  ],
  "StartTime": "2021-04-13T00:00:00+08:00",
  "EndTime": "2021-04-14T00:00:00+08:00",
  "Aggregation": 300,
  "ShowDetail": true
}

返回示例

{
    "ResponseMetadata":{
      "RequestId": "201806041104200100100232280022D30",
      "Action": "DescribePullToPushBandwidthData",
      "Version": "2020-08-01",
      "Service": "live",
      "Region": "cn-north-1"
  },
  "Result":{
    	"DomainList": ["example.com"],
   		"DstAddrTypeList": ["Live","Third"],
    	"StartTime": "2021-04-13T00:00:00+08:00",
    	"EndTime": "2021-04-14T00:00:00+08:00",
    	"Aggregation": 300,
    	"ShowDetail": true,
    	"PeakUpBandwidth": 12.0,
    	"BandwidthDataList": [
      {
          "TimeStamp": "2022-04-13T00:00:00+08:00",
          "UpBandwidth": 12.0,
      },
      {
          "TimeStamp": "2022-04-13T00:00:05+08:00",
          "UpBandwidth": 10.0,
      }
    	],
    	"BandwidthDetailDataList": [
      {
          "DstAddrType": "Live",
          "PeakUpBandwidth": 12.0,
          "BandwidthDataList": [
            {
               "TimeStamp": "2022-04-13T00:00:00+08:00",
               "UpBandwidth": 12.0,
            },
            {
               "TimeStamp": "2022-04-13T00:00:05+08:00",
               "UpBandwidth": 10.0,
            }
          ]
      },
      {
          "DstAddrType": "Third",
          "PeakUpBandwidth": 12.0,
          "BandwidthDataList": [
            {
               "TimeStamp": "2022-04-13T00:00:00+08:00",
               "UpBandwidth": 12.0,
            },
            {
               "TimeStamp": "2022-04-13T00:00:05+08:00",
               "UpBandwidth": 10.0,
            }
          ]
      }
    ]
  }
}

错误码

访问公共错误码获取详细信息。