All Products
Search
Document Center

MaxCompute:SumComputeMetricsByUsage

Last Updated:Apr 16, 2026

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

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: CU (CU usage) and SCAN (scanned data volume).

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.

  • 1xx: Informational response. The request is received and is being processed.

  • 2xx: Success. The request was successfully received, understood, and accepted.

  • 3xx: Redirection. Further action is required to complete the request.

  • 4xx: Client error. The request has invalid syntax or cannot be fulfilled.

  • 5xx: Server error. The server failed to fulfill an otherwise valid request.

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: Metering data for SQL jobs on internal tables.

ComputationSqlOTS: Metering data for SQL jobs on OTS external tables.

ComputationSqlOSS: Metering data for SQL jobs on OSS external tables.

MapReduce: Metering data for MapReduce jobs.

spark: Metering data for Spark jobs.

mars: Metering data for Mars jobs.

ComputationSql

dailyComputeMetrics

array<object>

The daily usage statistics.

object

The usage statistics for a day.

dateTime

string

The date of the usage, in yyyyMMdd format.

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.