Aggregates storage usage by storage type.
Operation description
Aggregates storage usage by storage type.
Try it now
Test
RAM authorization
Request syntax
POST /api/v1/storageMetrics/sumByType HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. For example: |
|
| projectNames |
array |
No |
An array of project names. |
|
|
string |
No |
A project name. |
projectName |
|
| startDate |
integer |
No |
Required. The query start time, specified as a Unix timestamp in milliseconds. |
1715393576201 |
| endDate |
integer |
No |
Required. The query end time, specified as a Unix timestamp in milliseconds. |
1718590596556 |
| statsType |
string |
No |
The dimension for aggregating statistics. Valid values: |
PROJECT |
Response elements
|
Element |
Type |
Description |
Example |
|
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 |
The request ID. |
0a06dc0917476202205161986edbbc |
| httpCode |
integer |
The HTTP status code.
|
200 |
| data |
array<object> |
The returned data. |
|
|
array<object> |
An object that contains the aggregated storage metrics for a specific storage type. |
||
| storageType |
string |
The storage type. Valid values:
|
Storage |
| usage |
number |
The total storage usage. |
329.503338 |
| unit |
string |
The unit of the storage metric. |
GB |
| dailyStorageMetrics |
array<object> |
A list of daily storage usage metrics. |
|
|
object |
An object that contains the daily storage usage metric. |
||
| storageType |
string |
The storage type. Valid values:
|
Storage |
| dateTime |
string |
The date of the metric, in |
20260410 |
| usage |
number |
The storage usage for this day. |
30 |
| percentage |
number |
The percentage of total daily storage that this storage type accounts for. |
50 |
| unit |
string |
The unit of the storage metric. |
GB |
Examples
Success response
JSON format
{
"requestId": "0a06dc0917476202205161986edbbc",
"httpCode": 200,
"data": [
{
"storageType": "Storage",
"usage": 329.503338,
"unit": "GB",
"dailyStorageMetrics": [
{
"storageType": "Storage",
"dateTime": "20260410",
"usage": 30,
"percentage": 50,
"unit": "GB"
}
]
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.