Retrieves a daily summary of costs, grouped by instance or billable item.
Operation description
Retrieves a daily summary of costs, grouped by instance or billable item.
Try it now
Test
RAM authorization
Request syntax
POST /api/v1/bills/sumByDate HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. Example: {"startDate":1775714495313,"endDate":1776232895313,"projectNames":["vw2","mcqa2_tpcds_test","bird"],"statsType":"FEE_ITEM","topN":8} |
|
| projectNames |
array |
No |
A list of instance names. In this context, an instance is a MaxCompute project. |
|
|
string |
No |
The name of the instance. |
projectName |
|
| startDate |
integer |
No |
The start time of the cost statistics period. |
1715393576201 |
| endDate |
integer |
No |
The end time of the cost statistics period. |
1718590596556 |
| statsType |
string |
No |
The statistics type. Valid values: |
PROJECT |
| topN |
integer |
No |
The number of top results to return, sorted by cost. |
8 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
PopResult<List |
||
| requestId |
string |
The request ID. |
BB66A390-4EF7-557E-9489-7F98D6F44002 |
| httpCode |
integer |
The HTTP status code. |
200 |
| data |
array<object> |
The list of results. |
|
|
array<object> |
An object that contains the daily cost breakdown. |
||
| dateTime |
string |
The date of the statistics, in |
20250719 |
| cost |
string |
The total cost for the specified |
2000 |
| currency |
string |
The currency. This is a fixed value. |
RMB |
| itemBills |
array<object> |
A list of billable items. |
|
|
object |
A billable item. |
||
| itemName |
string |
The name of the item. The value of this parameter depends on the |
projectName |
| cost |
string |
The cost. |
1000 |
| currency |
string |
The currency. This is a fixed value. |
RMB |
| percentage |
number |
The item's cost as a percentage of the total daily cost. This value does not include a percent sign (%). |
50 |
Examples
Success response
JSON format
{
"requestId": "BB66A390-4EF7-557E-9489-7F98D6F44002",
"httpCode": 200,
"data": [
{
"dateTime": "20250719",
"cost": "2000",
"currency": "RMB",
"itemBills": [
{
"itemName": "projectName",
"cost": "1000",
"currency": "RMB",
"percentage": 50
}
]
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.