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

查询存储用量

最近更新时间2024.04.01 18:01:10

首次发布时间2023.10.16 10:38:47

此接口用于查询指定时间范围内存储空间的用量。

注意事项

  • 请求频率:单用户请求频率限制为 10 次/秒
  • 权限说明:当使用子账号请求接口时,接口会按照子账号进行权限校验,只返回该子账号有权限的数据。详见给子账号添加项目权限说明。
  • 数据延迟:1 天。

请求说明

请求地址:https://vod.volcengineapi.com?Action=DescribeVodSpaceStorageData&Version=2023-07-01

调试

请求参数

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

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

SpaceList

String

test

点播空间名列表。多个空间名之间用英文逗号 , 隔开。

说明

如果是 POST 请求,此参数类型为 Array of String。

StartTime

String

2023-01-01T16:00:00Z

查询的起始时间。 日期格式要求符合 RFC3339 规范。

说明

开始时间最早不早于当前时间的 366 天。

EndTime

String

2023-01-02T16:00:00Z

查询的结束时间。日期格式要求符合 RFC3339 规范。

说明

单次查询的时间跨度不可超过 93 天。

AggregationInteger86400聚合的时间粒度。单位为秒,目前仅支持取值为 86400,即 24 小时。

Type

String

hot

存储类型。默认查询全部存储类型的用量。取值如下:

  • hot:标准存储。
  • lowfreq:低频存储。
  • archive:归档存储。
  • punish:低频存储提前删除量。
  • archive_punish:归档存储提前删除量。

返回参数

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

参数类型示例值描述
SpaceListArray of String["SpaceList"]点播空间名列表。
StartTimeString2023-01-01T16:00:00Z查询起始时间。
EndTimeString2023-01-02T16:00:00Z查询结束时间。
AggregationInteger86400聚合的时间粒度。

Type

String

hot

存储类型。取值如下:

  • hot:标准存储。
  • lowfreq:低频存储。
  • archive:归档存储。
  • punish:低频存储提前删除量。
  • archive_punish:归档存储提前删除量。

LatestStorageData

Long

123

所选时间段的最新存储量。单位为字节。

说明

当 Type 参数取值为 punish 和 archive_punish 时,该 LatestStorageData 参数对应的内容为所选时间段的存储总量

StorageDataListArray of StorageDataList-存储用量详细数据。

StorageDataList

参数类型示例值描述
TimeString2023-01-01T16:00:00Z时间。
StorageLong123存储量。单位为字节。

请求示例

https://vod.volcengineapi.com?Action=DescribeVodSpaceStorageData&Version=2023-07-01&Aggregation=86400&EndTime=2023-01-02T16%3A00%3A00Z&SpaceList=%5B%22test%22%5D&StartTime=2023-01-01T16%3A00%3A00Z&Type=hot

返回示例

HTTP/1.1 200 OK
Content-Length: 190
Content-Type: application/json

{
  "ResponseMetadata": 
  {
    "RequestId": "20201124165******22034080031B5",
    "Action": "DescribeVodSpaceStorageData",
    "Version": "2023-07-01",
    "Service": "vod",
    "Region": "cn-north-1"
  },
  "Result": 
  {
    "SpaceList":["SpaceList"
    ],
    "StartTime":"2019-10-12T07:20:50.52Z",
    "EndTime":"2019-10-12T07:20:50.52Z",
    "Aggregation":1,
    "Type":"Type",
    "LatestStorageData":"LatestStorageData",
    "StorageDataList":[
      {
        "Time":"2019-10-12T07:20:50.52Z",
        "Storage":"Storage"
      }
    ]
  }
}

错误码

本接口无特有的错误码。更多信息请见公共错误码

服务端 SDK

点播 OpenAPI 提供了配套的服务端 SDK,支持多种编程语言,帮助您实现快速开发。建议使用服务端 SDK 来调用 API。此 API 各语言调用的示例代码,请参考如下: