All Products
Search
Document Center

MaxCompute:ListJobMetric - 获取作业性能指标

Last Updated:Aug 20, 2026

获取运行结束的作业的性能指标。

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

odps:ListJobMetric

list

*全部资源

*

None None

Request syntax

POST /api/v1/jobs/metric HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

startTime

integer

Yes

查询时间范围:开始时间。

1735534322

endTime

integer

Yes

查询时间范围:结束时间。

1735536322

body

object

No

请求体参数。

metric

string

No

观测指标信息。

Valid values:

  • inputBytes :

    inputBytes

  • memory :

    memory

  • num :

    num

  • inputBytesPerCu :

    inputBytesPerCu

  • cpu :

    cpu

  • runningTime :

    runningTime

num

type

string

No

观测指标的类型信息。

Valid values:

  • p1 :

    仅 runningTime 支持

  • p99 :

    仅 runningTime 支持

  • total :

    仅 num,cpu,memory,inputBytes,inputBytesPerCu 支持

  • min :

    仅 runningTime 支持

  • avg :

    仅 runningTime 支持

  • max :

    仅 runningTime 支持

  • p5 :

    仅 runningTime 支持

  • p90 :

    仅 runningTime 支持

  • p50 :

    仅 runningTime 支持

  • p95 :

    仅 runningTime 支持

  • p10 :

    仅 runningTime 支持

total

project

array

No

MaxCompute 项目名称列表(用于过滤)。

string

No

项目名称。

project_a

quota

array

No

作业使用的计算 Quota 昵称列表(用于过滤)。

string

No

计算 Quota 昵称。

os_PayAsYouGoQuota

period

integer

No

监控统计周期。

Valid values:

  • 3600 :

    3600

  • 86400 :

    86400

3600

group

string

No

分组依据。

Note

可选值有:project,quota,type,status。含义:

  • project:按项目分组聚合;

  • quota:按配额分组聚合;

  • type:按作业类型分组聚合;

  • status:按作业状态分组聚合。

Valid values:

  • quota :

    quota

  • project :

    project

  • type :

    type

  • status :

    status

project

Response elements

Element

Type

Description

Example

object

PopResult

requestId

string

请求 ID。

0be3e0aa16667684362147582e038f

httpCode

integer

HTTP 状态码。

  • 1xx:信息响应 - 请求已接收,正在处理中。

  • 2xx:成功 - 请求动作已被服务端成功接收、理解并接受。

  • 3xx:重定向 - 请求被重定向,采取进一步行动以完成请求。

  • 4xx:客户端错误 - 请求包含错误请求参、语法或特定请求条件无法满足。

  • 5xx:服务端错误 - 服务器由于其他原因无法满足请求。

200

errorCode

string

错误码。

OBJECT_NOT_EXIST

errorMsg

string

错误信息。

This object does not exist.

data

object

请求返回结果。

category

string

指标类型。

job

name

string

指标名称。

num

period

integer

监控统计周期。

3600

metrics

array<object>

指标详情。

array<object>

指标值。

metric

object

指标相关信息。

string

指标信息。

Note

可能值有:type,project,quota,group。

"type": "total"

values

array

指标数值信息。

array

指标数值列表。

number

size 为 2 的列表,第一列表示时间戳,第二列表示对应数值。

1736679600, 3

Examples

Success response

JSON format

{
  "requestId": "0be3e0aa16667684362147582e038f",
  "httpCode": 200,
  "errorCode": "OBJECT_NOT_EXIST",
  "errorMsg": "This object does not exist.",
  "data": {
    "category": "job",
    "name": "num",
    "period": 3600,
    "metrics": [
      {
        "metric": {
          "key": "\"type\": \"total\""
        },
        "values": [
          [
            0
          ]
        ]
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.