按存储类型统计存储使用量
接口说明
按存储类型统计存储使用量
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
POST /api/v1/storageMetrics/sumByType HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| body |
object |
否 |
请求体参数, eg. {"startDate":1775736972887,"endDate":1776255372887} |
|
| projectNames |
array |
否 |
实例名称 |
|
|
string |
否 |
实例名称 |
projectName |
|
| startDate |
integer |
否 |
统计周期的开始时间;毫秒级别时间戳,必填参数。 |
1715393576201 |
| endDate |
integer |
否 |
统计周期的结束时间;毫秒级别时间戳,必填参数。 |
1718590596556 |
| statsType |
string |
否 |
统计类型, 枚举值:PROJECT(实例)/ STORAGE_TYPE(存储类型) |
PROJECT |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回结果: { "data":[ { "unit":"GB", "usage":1300590.087592, "dailyStorageMetrics":[ { "dateTime":"20260409", "unit":"GB", "usage":188646.972738, "percentage":100.0 }, { "dateTime":"20260410", "unit":"GB", "usage":183595.781138, "percentage":100.0 }, { "dateTime":"20260411", "unit":"GB", "usage":183558.852148, "percentage":100.0 }, { "dateTime":"20260412", "unit":"GB", "usage":182844.984265, "percentage":100.0 }, { "dateTime":"20260413", "unit":"GB", "usage":184196.743598, "percentage":100.0 }, { "dateTime":"20260414", "unit":"GB", "usage":183833.465982, "percentage":100.0 }, { "dateTime":"20260415", "unit":"GB", "usage":193913.287722, "percentage":100.0 } ], "storageType":"Storage" }, { "unit":"GB", "usage":1300590.087592, "dailyStorageMetrics":[ { "dateTime":"20260409", "unit":"GB", "usage":188646.972738, "percentage":100.0 }, { "dateTime":"20260410", "unit":"GB", "usage":183595.781138, "percentage":100.0 }, { "dateTime":"20260411", "unit":"GB", "usage":183558.852148, "percentage":100.0 }, { "dateTime":"20260412", "unit":"GB", "usage":182844.984265, "percentage":100.0 }, { "dateTime":"20260413", "unit":"GB", "usage":184196.743598, "percentage":100.0 }, { "dateTime":"20260414", "unit":"GB", "usage":183833.465982, "percentage":100.0 }, { "dateTime":"20260415", "unit":"GB", "usage":193913.287722, "percentage":100.0 } ], "storageType":"$sum" } ], "requestId":"0adbb1ef17762559936096081d0001" } |
||
| requestId |
string |
请求 ID。 |
0a06dc0917476202205161986edbbc |
| httpCode |
integer |
HTTP 状态码。
|
200 |
| data |
array<object> |
返回数据 |
|
|
array<object> |
返回数据。 |
||
| storageType |
string |
存储类型。包括:
|
Storage |
| usage |
number |
存储总量 |
329.503338 |
| unit |
string |
存储指标单位。 |
GB |
| dailyStorageMetrics |
array<object> |
按日统计的存储使用量列表 |
|
|
object |
按日统计的存储使用量 |
||
| storageType |
string |
存储类型。包括:
|
Storage |
| dateTime |
string |
统计日期。格式为 yyyyMMdd |
20260410 |
| usage |
number |
存储用量 |
30 |
| percentage |
number |
存储用量百分比 |
50 |
| unit |
string |
存储指标单位。 |
GB |
示例
正常返回示例
JSON格式
{
"requestId": "0a06dc0917476202205161986edbbc",
"httpCode": 200,
"data": [
{
"storageType": "Storage",
"usage": 329.503338,
"unit": "GB",
"dailyStorageMetrics": [
{
"storageType": "Storage",
"dateTime": "20260410",
"usage": 30,
"percentage": 50,
"unit": "GB"
}
]
}
]
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。