All Products
Search
Document Center

MaxCompute:SumComputeMetricsByRecord

Last Updated:Apr 16, 2026

Calculates the total number of usage records.

Operation description

Calculates the total number of usage records over a specified time range.

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/sumByRecord HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body. For example: {"startDate":1775714495313,"endDate":1776232895313,"projectNames":["vw2","mcqa2_tpcds_test","bird"]}

projectNames

array

No

The list of project names.

string

No

The project name.

projectName

startDate

integer

No

The start of the time range to query, specified as a required Unix timestamp in milliseconds.

1715393576201

endDate

integer

No

The end of the time range to query, specified as a required Unix timestamp in milliseconds.

1718590596556

Response elements

Element

Type

Description

Example

object

The response body. For example: { "data":[ { "dailyComputeRecords":[ { "dateTime":"20260409", "record":"494", "percentage":100.0 }, { "dateTime":"20260410", "record":"89", "percentage":100.0 }, { "dateTime":"20260411" }, { "dateTime":"20260412" }, { "dateTime":"20260413" }, { "dateTime":"20260414", "record":"9", "percentage":100.0 }, { "dateTime":"20260415" } ], "type":"$sum" }, { "dailyComputeRecords":[ { "dateTime":"20260409", "record":"494", "percentage":100.0 }, { "dateTime":"20260410", "record":"89", "percentage":100.0 }, { "dateTime":"20260411" }, { "dateTime":"20260412" }, { "dateTime":"20260413" }, { "dateTime":"20260414", "record":"9", "percentage":100.0 }, { "dateTime":"20260415" } ], "type":"ComputationSql" } ], "requestId":"0adbdcee17762496758954804d0001" }

requestId

string

The request ID.

0a06dfe517540143853845404e83af

httpCode

integer

The HTTP status code.

  • 1xx: Informational. The server has received the request and is processing it.

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

  • 3xx: Redirection. The client must take further action to complete the request.

  • 4xx: Client-side error. The request contains invalid syntax or parameters and cannot be fulfilled.

  • 5xx: Server-side error. The server failed to fulfill a valid request.

200

data

array<object>

The response data.

array<object>

An object containing usage data for a specific usage type.

type

string

The usage type. For example: ComputationSql

ComputationSql

dailyComputeRecords

array<object>

A list of daily usage records.

object

A daily usage record.

dateTime

string

The statistics date. The format is yyyyMMdd.

20260411

record

string

The record count.

1200

percentage

number

This day's usage as a percentage of the total usage for the specified period. The value does not include a percent sign (%).

50

Examples

Success response

JSON format

{
  "requestId": "0a06dfe517540143853845404e83af",
  "httpCode": 200,
  "data": [
    {
      "type": "ComputationSql",
      "dailyComputeRecords": [
        {
          "dateTime": "20260411",
          "record": "1200",
          "percentage": 50
        }
      ]
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.