All Products
Search
Document Center

MaxCompute:GetRunningJobs

Last Updated:Dec 16, 2024

Obtains the running state data of jobs that are in the running state in a specified period of time.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
odps:GetRunningJobslist
*All Resources
*
    none
none

Request syntax

GET /api/v1/jobs/runningJobs HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
fromlongYes

The time when the query starts. This parameter specifies the time when a job is submitted.

  • The time range that is specified by the from and to request parameters is a closed interval. The start time and end time are included in the range. If the value of from is the same as the value of to, the time range is invalid, and a null value is returned.
  • The value is a UNIX timestamp that represents the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC.
1683785928
tolongYes

The time when the query ends. This parameter specifies the time when a job is submitted.

  • The time interval that is specified by the from and to request parameters is a closed interval. The start time and end time are included in the interval. If the value of from is the same as the value of to, the interval is invalid, and a null value is returned.
  • The value is a UNIX timestamp that represents the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC.
1683612946
jobOwnerListarrayNo

The list of job executors.

itemstringNo

The list of job executors.

ALIYUN$xxx@test.aliyunid.com
quotaNicknameListarrayNo

The list of nicknames of quotas that are used by jobs.

itemstringNo

The list of nicknames of quotas that are used by jobs.

my_quota
pageNumberlongNo

The page number.

1
pageSizelongNo

The number of entries per page. Default value: 10. Maximum value: 20.

10

Response parameters

ParameterTypeDescriptionExample
object

PopResult

requestIdstring

The ID of the request.

0bc3b4ab16684833172127321e2c25
httpCodeinteger

Indicates whether the request was successful. If this parameter was not empty and the value of this parameter was not 200, the request failed.

200
errorCodestring
  • If the value of success was false, an error code was returned.
  • If the value of success was true, a null value was returned.
success
errorMsgstring

The error message.

0A3B1FD2006A24C8D8BE65CDAC028298
dataobject

The returned data.

runningJobInfoListarray<object>

The list of jobs in the running state.

runningJobInfoListobject
instanceIdstring

The instance ID.

2023050206371544gomgtp3ljcr4
jobOwnerstring

The account that submits the job.

ALIYUN$xxx@test.aliyunid.com
projectstring

The name of the MaxCompute project.

project_20221021123044_981b
quotaNicknamestring

The nickname of the quota that is used by the job.

my_quota
cuSnapshotdouble

The compute unit (CU) snapshot proportion of the job.

0.45
memorySnapshotdouble

The memory snapshot proportion of the job.

0.45
submittedAtTimelong

The time when the job is submitted.

1689746864
runningAtTimelong

The time when the job starts to run.

1689746864
progressdouble

The progress of the job.

0
totalCountlong

The total number of returned entries.

64
pageNumberlong

The page number.

2
pageSizelong

The number of entries per page.

10

Examples

Sample success responses

JSONformat

{
  "requestId": "0bc3b4ab16684833172127321e2c25",
  "httpCode": 200,
  "errorCode": "success",
  "errorMsg": "0A3B1FD2006A24C8D8BE65CDAC028298",
  "data": {
    "runningJobInfoList": [
      {
        "instanceId": "2023050206371544gomgtp3ljcr4",
        "jobOwner": "ALIYUN$xxx@test.aliyunid.com",
        "project": "project_20221021123044_981b",
        "quotaNickname": "my_quota",
        "cuSnapshot": 0.45,
        "memorySnapshot": 0.45,
        "submittedAtTime": 1689746864,
        "runningAtTime": 1689746864,
        "progress": 0
      }
    ],
    "totalCount": 64,
    "pageNumber": 2,
    "pageSize": 10
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-08-26The internal configuration of the API is changed, but the call is not affectedView Change Details