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

查询峰值流数

最近更新时间2023.10.23 16:15:05

首次发布时间2023.09.25 14:36:18

查询推流、拉流、回源流、转码流的峰值流数。

注意事项

  • 请求频率:单用户请求频率限制为 100 次/秒
  • 数据延迟:数据延迟为 5 分钟

请求说明

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

请求参数

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

Query

参数类型是否必选示例值描述
ActionStringDescribeLiveStreamCountData接口名称。当前 API 的名称为 DescribeLiveStreamCountData
VersionString2023-01-01接口版本。当前 API 的版本为 2023-01-01

Body

参数类型是否必选示例值描述
DomainListArray of String["exmaple.com","example2.com"]域名列表,缺省情况表示该用户的所有域名。
StartTimeString2021-08-16T00:00:00+08:00查询的开始时间,RFC3339 格式的 UTC 时间,精度为 s。
EndTimeString2021-08-16T00:01:59+08:00查询的结束时间,RFC3339 格式的 UTC 时间,精度为 s。

Aggregation

Integer

60

聚合的时间粒度,支持以下取值:

  • 60s:查询支持的时间跨度为 24h、历史查询时间范围为 7d
  • 300s:查询支持的时间跨度为 31d、历史查询时间范围为 93d
  • 3600s:查询支持的时间跨度为 93d、历史查询时间范围为93d
  • 1d:查询支持的时间跨度为 93d、历史查询时间范围为93d,
    默认 300s。
DetailFieldArray of String["Domain"]数据拆分的维度,可取元素"Domain",设置为空时不进行数据拆分。

StreamType

Array of String

["push"]

流类型,默认查全部,支持以下取值:

  • 推流:push
  • 拉流:pull
  • 回源流:relay-source
  • 转码:transcode

返回参数

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

参数类型示例值描述
DomainListArray of String["example.com","example2.com"]域名列表。
StartTimeString2021-08-16T00:00:00+08:00查询开始时间。
EndTimeString2021-08-16T00:01:59+08:00查询结束时间。
AggregationInteger60数据聚合的时间粒度。
DetailFieldArray of String["Domain"]数据拆分的维度。
StreamTypeArray of String["push"]流类型。
PeakCountInteger100峰值流数。
TotalStreamDataListArray of TotalStreamDataList-按指定时间粒度聚合的峰值流数数据。
StreamDetailDataListArray of StreamDetailDataList-按指定维度拆分后的峰值流数数据。

TotalStreamDataList

参数类型示例值描述
TimeStampString2021-08-16T00:00:00+08:00时间片的开始时间,RFC3339 格式的 UTC 时间,精度为 s。
PeakCountInteger100峰值流数。

StreamDetailDataList

参数类型示例值描述
DomainStringexample.com域名。
TotalStreamDataListArray of TotalStreamDataList-当前数据拆分维维度下的峰值流数数据。

示例

请求示例

POST https://live.volcengineapi.com?Action=DescribeLiveStreamCountData&Version=2023-01-01
{
  "DomainList": [
    "example1.com",
    "example2.com"
  ],
  "StartTime": "2021-08-16T00:00:00+08:00",
  "EndTime": "2021-08-16T00:01:59+08:00",
  "Aggregation": 60,
  "DetailField": [
    "Domain"
  ],
  "StreamType": [
    "pull",
    "relay-source"
  ]
}

返回示例

{
  "ResponseMetadata": {
    "RequestId": "201806041104200100100232280022D30",
    "Action": "DescribeLiveSourceStreamCountData",
    "Version": "2023-01-01",
    "Service": "live",
    "Region": "cn-north-1"
  },
  "Result": {
    "DomainList": [
      "example.com",
      "example2.com"
    ],
    "StartTime": "2021-08-16T00:00:00+08:00",
    "EndTime": "2021-08-16T00:01:59+08:00",
    "Aggregation": 60,
    "DetailField": [
      "Domain"
    ],
    "StreamType": [
      "pull",
      "relay-source"
    ],
    "PeakCount": 100,
    "TotalStreamDataList": [
      {
        "TimeStamp": "2021-08-16T00:00:00+08:00",
        "PeakCount": 100
      }
    ],
    "StreamDetailDataList": [
      {
        "Domain": "example.com",
        "TotalStreamDataList": [
          {
            "TimeStamp": "2021-08-16T00:00:00+08:00",
            "PeakCount": 100
          }
        ]
      },
      {
        "Domain": "example2.com",
        "TotalStreamDataList": [
          {
            "TimeStamp": "2021-08-16T00:00:00+08:00",
            "PeakCount": 100
          }
        ]
      }
    ]
  }
}

错误码

下表仅列出本接口特有的错误码。更多信息请参见公共错误码获取详细信息。

状态码错误码错误信息说明
200CommonErr-未分类错误。建议重试,如果仍返回该错误码,请联系技术支持
400InvalidParam-输入的参数无效或不符合要求,请参照请求参数说明进行检查。
400InvalidParam.BindErrorRequest parameter error, please check input data参数未通过校验,请检查参数类型是否正确。
403RequestForbidden-请求被拒绝,当前账号下无请求的资源(域名空间、域名、应用、配置模版、证书)。
403RequestForbidden.AccountIDNotAllowthis AccountID does not have permission to access the corresponding resource, please check the request parameters请求被拒绝,当前账号下无请求的资源(域名空间、域名、应用、配置模版、证书)。
403RequestForbidden.BillingStatusBilling status is not available for the AccountID, please activate the service or recharge.未开通视频直播服务或账号欠费,造成账单不可用,请检查服务开通情况和账号欠费情况。
404ResourceNotFound-未找到资源(域名空间、域名、应用、配置模版、证书)。建议重试,如果仍返回该错误码,请联系技术支持
500InternalErroran internal error occurred, please contact the administrator.出现内部错误,请联系技术支持
502InternalServiceErroran internal error occurred, please contact the administrator.服务间出现错误,请联系技术支持
502InternalServiceError.BadResponsean internal error occurred, please contact the administrator.服务间出现错误,请联系技术支持
504InternalServiceTimeoutInternal Service is timeout. please contact the administrator.内部服务超时,请联系技术支持