Aggregates compute usage by scanned data volume or CU usage.
Operation description
Aggregates compute usage by scanned data volume or CU usage.
Try it now
Test
RAM authorization
Request syntax
POST /api/v1/computeMetrics/sumByUsage HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body parameters. |
|
| projectNames |
array |
No |
The project names. |
|
|
string |
No |
A project name. |
projectName |
|
| startDate |
integer |
No |
The start timestamp for the query, in milliseconds. |
1715393576201 |
| endDate |
integer |
No |
The end timestamp for the query, in milliseconds. |
1718590596556 |
| usageType |
string |
No |
The usage type. Valid values: |
SCAN |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned result. For example: { "data":[ { "dailyComputeMetrics":[ { "dateTime":"20260410", "unit":"GBCplx", "usage":"1400" }, { "dateTime":"20260411" }, { "dateTime":"20260412" }, { "dateTime":"20260413", "unit":"GBCplx", "usage":"2500" }, { "dateTime":"20260414", "unit":"GBCplx", "usage":"0.169228057" }, { "dateTime":"20260415", "unit":"GBCplx", "usage":"1.149683987" }, { "dateTime":"20260416" } ], "type":"ComputationSql" } ], "requestId":"0adb99df17763178343322885d0001" } |
||
| requestId |
string |
The request ID. |
0bc0598d17544456742466519e6611 |
| httpCode |
integer |
The HTTP status code.
|
200 |
| data |
array<object> |
The usage data for each metering type. |
|
|
array<object> |
The usage data for a metering type. |
||
| type |
string |
The metering type.
|
ComputationSql |
| dailyComputeMetrics |
array<object> |
The daily usage statistics. |
|
|
object |
The usage statistics for a day. |
||
| dateTime |
string |
The date of the usage, in |
20260413 |
| usage |
string |
The total usage for the day. |
1.149683987 |
| unit |
string |
The unit of compute usage. |
GBCplx |
Examples
Success response
JSON format
{
"requestId": "0bc0598d17544456742466519e6611",
"httpCode": 200,
"data": [
{
"type": "ComputationSql",
"dailyComputeMetrics": [
{
"dateTime": "20260413",
"usage": "1.149683987",
"unit": "GBCplx"
}
]
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.