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

查询直播时移存储用量

最近更新时间2023.12.04 11:00:42

首次发布时间2023.09.25 14:35:35

指定时间范围,查询每日直播时移功能的存储用量。

注意

该接口适用于视频直播提供时移能力的场景,如时移文件存储于视频点播 VoD 或对象存储 ToS,请联系我们,获取用量查询方法。

注意事项

  • 请求频率:单用户请求频率限制为 100 次/秒
  • 数据延迟:查询时间次日 08:00 点。
  • 数据进制:存储容量数据统计进制为 1024,例如,1 GB = 1024 MB。

请求说明

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

请求参数

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

Query

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

Body

参数类型是否必选示例值描述
AggregationInteger86400时间粒度,单位为 s,支持配置为 86400,单次查询时间跨度为 93 天,历史查询时间范围为 366 天。
EndTimeString2022-02-17T23:59:59+08:00结束时间,RFC3339 格式的 UTC 时间,精度为 s。
StartTimeString2022-02-11T00:00:00+08:00开始时间,RFC3339 格式的 UTC 时间,精度为 s。
VhostsArray of String["www.example.com"]域名空间列表,缺省情况表示查询该用户的所有域名空间。

返回参数

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

参数类型示例值描述
VhostsArray of String["www.example.com"]域名空间列表。
StartTimeString2022-02-16T00:00:00+08:00开始时间。
EndTimeString2022-02-17T23:59:59+08:00结束时间。
AggregationInteger86400聚合时间粒度。
TimeShiftDataListArray of TimeShiftDataList-时移存储数据。

TimeShiftDataList

参数类型示例值描述
TimeStampString2022-02-16T00:00:00+08:00时间点,默认为每日的结束时间。例如,返回 2022-02-16T00:00:00+08:00,表示取该时刻的存储用量作为 2 月 16 日的计费用量。
StorageFloat4503380.1存储用量,单位为 GB。

示例

请求示例

POST https://live.volcengineapi.com?Action=DescribeLiveTimeShiftData&Version=2023-01-01

{
  "Aggregation": 86400,
  "EndTime": "2022-02-17T23:59:59+08:00",
  "StartTime": "2022-02-11T00:00:00+08:00",
  "Vhosts": [
    "www.example.com"
  ]
}

返回示例

{
    "ResponseMetadata":{
        "RequestId":"20180604110420010010****",
        "Action":"DescribeLiveTimeShiftData",
        "Version":"2023-01-01",
        "Service":"live",
        "Region":"cn-north-1"
    },
    "Result":{
        "Vhosts": ["www.example.com"],
        "StartTime": "2022-02-16T00:00:00+08:00",
        "EndTime":"2022-02-17T23:59:59+08:00",
        "TimeShiftDataList":[
          {
            "TimeStamp":"2022-02-16T00:00:00+08:00",
            "Storage":4503380,     // 存储用量,单位GB
          },
          {
            "TimeStamp":"2022-02-16T00:05:00+08:00",
            "Storage":4503380,     // 存储用量,单位GB
          }
      	]
    }
}

错误码

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

状态码错误码错误信息说明
200CommonErr-未分类错误。建议重试,如果仍返回该错误码,请联系技术支持
400InvalidParam-输入的参数无效或不符合要求,请参照请求参数说明进行检查。
400InvalidParam.BindErrorRequest parameter error, please check input data参数未通过校验,请检查参数类型是否正确。
403RequestForbidden-请求被拒绝,当前账号下无请求的资源(域名空间、域名、应用、配置模版、证书)。
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.内部服务超时,请联系技术支持