GetRunningJobs

Updated at:

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

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:GetRunningJobs

list

*All Resource

*

None None

Request syntax

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

Request parameters

Parameter

Type

Required

Description

Example

from

integer

Yes

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

to

integer

Yes

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

jobOwnerList

array

No

The list of job executors.

string

No

The list of job executors.

ALIYUN$xxx@test.aliyunid.com

quotaNicknameList

array

No

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

string

No

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

my_quota

pageNumber

integer

No

The page number.

1

pageSize

integer

No

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

10

Response elements

Element

Type

Description

Example

object

PopResult

requestId

string

The ID of the request.

0bc3b4ab16684833172127321e2c25

httpCode

integer

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

errorCode

string

  • 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

errorMsg

string

The error message.

0A3B1FD2006A24C8D8BE65CDAC028298

data

object

The returned data.

runningJobInfoList

array<object>

The list of jobs in the running state.

object

instanceId

string

The instance ID.

2023050206371544gomgtp3ljcr4

jobOwner

string

The account that submits the job.

ALIYUN$xxx@test.aliyunid.com

project

string

The name of the MaxCompute project.

project_20221021123044_981b

quotaNickname

string

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

my_quota

cuSnapshot

number

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

0.45

memorySnapshot

number

The memory snapshot proportion of the job.

0.45

submittedAtTime

integer

The time when the job is submitted.

1689746864

runningAtTime

integer

The time when the job starts to run.

1689746864

progress

number

The progress of the job.

0

totalCount

integer

The total number of returned entries.

64

pageNumber

integer

The page number.

2

pageSize

integer

The number of entries per page.

10

Examples

Success response

JSON format

{
  "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

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.