All Products
Search
Document Center

E-MapReduce:GetRayJob

Last Updated:Oct 09, 2026

Retrieves Ray Job information.

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

emr-serverless-spark:GetRayJob

get

*All Resource

*

None None

Request syntax

GET /api/v1/workspaces/{workspaceId}/rayJob/{submissionId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

workspaceId

string

No

The workspace ID.

w-d2d82aa09155

submissionId

string

No

The ID of the Ray Job.

rj-xxxxxxxxxx

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

Response elements

Element

Type

Description

Example

object

Schema of Response

requestId

string

The request ID.

DD6B1B2A-5837-5237-ABE4-FF0C8944

submissionId

string

The ID of the Ray Job.

rj-xxxxxxxxxx

name

string

The name of the Ray cluster.

myRayCluster

displayReleaseVersion

string

The Ray DPI engine version.

err-1.2.0 (Ray 2.55.1, Python 3.12)

tags

array

The tags.

Tag

The tags.

status

string

The task status. Valid values:

  • Submitted: The task is submitted.

  • Pending: The cluster is being created.

  • Running: The task is running.

  • Succeeded: The task succeeded.

  • Failed: The task failed.

  • Cancelling: The task is being canceled.

  • Cancelled: The task is canceled.

  • Timeout: The task timed out and was canceled.

Running

message

string

The execution information.

Job finished successfully.

entrypoint

string

The startup command.

python main.py

submitTime

integer

The task submission time. This value is a UNIX timestamp in milliseconds.

1750327082303

startTime

integer

The start time. This value is a UNIX timestamp in milliseconds.

1750327083303

endTime

integer

The task end time. This value is a UNIX timestamp in milliseconds.

1762949372000

duration

integer

The task duration, in seconds.

2459764

networkServiceName

string

The network connectivity name.

vpc

runtimeEnvJson

string

The Ray runtime environment JSON string.

{"pip":["requests==2.26.0","pendulum==2.1.2"],"env_vars":{"KEY":"VALUE"}}

workingDir

string

The URL of the task code working directory.

oss://mybucket/hello.zip

submissionMode

string

The job submission mode.

HTTPMode

metadataJson

string

The task metadata JSON string.

{"owner": "alice"}

entrypointNumCpus

string

The number of CPUs requested by the entrypoint task.

1

entrypointNumGpus

string

The number of GPUs requested by the entrypoint task.

0

entrypointMemory

string

The memory size requested by the entrypoint task.

4Gi

entrypointResources

string

The custom resource request JSON string for the entrypoint task.

{"fpu": 1}

shutdownAfterJobFinishes

boolean

Specifies whether to automatically destroy the temporary cluster after the task is completed. Default value: true.

true

ttlSecondsAfterFinished

integer

The number of seconds to wait before destroying the cluster. This parameter takes effect only when shutdownAfterJobFinishes is set to true.

60

activeDeadlineSeconds

integer

The timeout period.

3600

volumeIds

array

The list of managed file IDs.

string

The managed file ID.

vol-123456789

backoffLimit

integer

The number of failure retries. Currently fixed at 0.

2

headSpec

object

The parameters of the Ray cluster head node.

replica

integer

The number of nodes.

1

enableAutoScaling

boolean

Indicates whether automatic scaling is enabled for worker nodes.

true

idleTimeoutSeconds

integer

The idle timeout for worker nodes when automatic scaling is enabled.

60

queueName

string

The queue name.

root_queue

cpu

string

The number of CPU cores.

2

memory

string

The memory size, in GiB.

8Gi

gpuSpec

string

The GPU type.

ecs.gn6i-c4g1.xlarge

displayReleaseVersion

string

The Ray DPI engine version.

err-1.3.0 (Ray 2.55.1, Python 3.12)

workerSpecs

array<object>

The Ray cluster worker node information.

object

The Ray cluster worker node information struct.

groupName

string

The worker node group name.

WorkerGroup1

replica

integer

The number of worker nodes.

1

minReplica

integer

The minimum number of workers.

1

maxReplica

integer

The maximum number of workers.

10

queueName

string

The queue name.

root_queue

cpu

string

The number of CPU cores.

2

memory

string

The memory size, in GiB.

8Gi

gpuSpec

string

The GPU type.

ecs.gn6i-c4g1.xlarge

displayReleaseVersion

string

The DPI engine version.

ray-1.2.0 (Ray 2.55.1, Python 3.12)

extraParam

string

The extra parameters in JSON format.

{"userDefinedFiles": "oss://mybucket/artifact/config.json,oss://mybucket/artifact/config2.json", "userRequirementsFile": "oss://mybucket/requirements.txt"}

creatorName

string

The nickname of the creator.

Alice

dashboardUrl

string

The dashboard URL of the Ray cluster. When the Ray cluster is in the Running state, this is the Runtime UI. After the cluster enters the Deleted state, this is the History UI. History UI is supported only in err-1.2.0 and later versions.

https://emr-ray-gateway-cn-hangzhou.aliyuncs.com/workspace/w-xxxxxxxx/raycluster/ray-xxxxxx/dashboard?token=xxxxxx

logBucketName

string

The name of the bucket that stores logs.

ss-ray-cn-hangzhou

logPath

string

The path where logs are stored.

w-xxxxxxx/ray/logs/xxxxxx/

cuHours

number

The consumed CU resources. This value is returned 10 minutes after the cluster is released.

1899

guHours

object

The consumed GPU hours. This field is currently empty.

gpuSpec

string

The GPU type.

ecs.gn6i-c4g1.xlarge

gpuHours

number

The consumed GPU hours.

2.6

dashboardUrlExtra

array

The extra dashboard UI URLs. This field is currently empty.

string

The extra dashboard UI URLs. This field is currently empty.

-

clusterState

string

The status of the corresponding Ray cluster. Valid values:

  • Deleted: Deleted.

  • Submitted: Submitted but creation has not started.

  • Pending: Being created.

  • Running: Running.

Running

taskBizId

string

The ID of the data development node.

TSK-682e0112f6f24d9f9305b92174846985

Examples

Success response

JSON format

{
  "requestId": "DD6B1B2A-5837-5237-ABE4-FF0C8944",
  "submissionId": "rj-xxxxxxxxxx",
  "name": "myRayCluster",
  "displayReleaseVersion": "err-1.2.0 (Ray 2.55.1, Python 3.12)",
  "tags": [
    {
      "key": "workflowId",
      "value": "wf-123test"
    }
  ],
  "status": "Running",
  "message": "Job finished successfully.",
  "entrypoint": "python main.py",
  "submitTime": 1750327082303,
  "startTime": 1750327083303,
  "endTime": 1762949372000,
  "duration": 2459764,
  "networkServiceName": "vpc",
  "runtimeEnvJson": "{\"pip\":[\"requests==2.26.0\",\"pendulum==2.1.2\"],\"env_vars\":{\"KEY\":\"VALUE\"}}",
  "workingDir": "oss://mybucket/hello.zip",
  "submissionMode": "HTTPMode",
  "metadataJson": "{\"owner\": \"alice\"}",
  "entrypointNumCpus": "1",
  "entrypointNumGpus": "0",
  "entrypointMemory": "4Gi",
  "entrypointResources": "{\"fpu\": 1}",
  "shutdownAfterJobFinishes": true,
  "ttlSecondsAfterFinished": 60,
  "activeDeadlineSeconds": 3600,
  "volumeIds": [
    "vol-123456789"
  ],
  "backoffLimit": 2,
  "headSpec": {
    "replica": 1,
    "enableAutoScaling": true,
    "idleTimeoutSeconds": 60,
    "queueName": "root_queue",
    "cpu": "2",
    "memory": "8Gi",
    "gpuSpec": "ecs.gn6i-c4g1.xlarge",
    "displayReleaseVersion": "err-1.3.0 (Ray 2.55.1, Python 3.12)"
  },
  "workerSpecs": [
    {
      "groupName": "WorkerGroup1",
      "replica": 1,
      "minReplica": 1,
      "maxReplica": 10,
      "queueName": "root_queue",
      "cpu": "2",
      "memory": "8Gi",
      "gpuSpec": "ecs.gn6i-c4g1.xlarge",
      "displayReleaseVersion": "ray-1.2.0 (Ray 2.55.1, Python 3.12)"
    }
  ],
  "extraParam": "{\"userDefinedFiles\": \"oss://mybucket/artifact/config.json,oss://mybucket/artifact/config2.json\", \"userRequirementsFile\": \"oss://mybucket/requirements.txt\"}",
  "creatorName": "Alice",
  "dashboardUrl": "https://emr-ray-gateway-cn-hangzhou.aliyuncs.com/workspace/w-xxxxxxxx/raycluster/ray-xxxxxx/dashboard?token=xxxxxx",
  "logBucketName": "ss-ray-cn-hangzhou",
  "logPath": "w-xxxxxxx/ray/logs/xxxxxx/",
  "cuHours": 1899,
  "guHours": {
    "gpuSpec": "ecs.gn6i-c4g1.xlarge",
    "gpuHours": 2.6
  },
  "dashboardUrlExtra": [
    "-"
  ],
  "clusterState": "Running",
  "taskBizId": "TSK-682e0112f6f24d9f9305b92174846985"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.