Updated on 2026-11-06 GMT+08:00

Viewing Ray Job Details

Function

This API is used to view the details of a Ray job. This API is a synchronous API. After the request for viewing the details of a Ray job is submitted, the result is returned.

Calling Method

For details, see Calling APIs.

URI

GET /v2/workspaces/{workspace_id}/ray-jobs/{job_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

workspace_id

Yes

String

Definition: Workspace ID. For details about how to obtain the workspace ID, see Obtaining a Workspace ID.

Constraints: N/A

Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed.

Default Value: N/A

job_id

Yes

String

Definition: Job ID. It can be obtained by calling the Listing Ray Jobs API.

Constraints: N/A

Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed.

Default Value: N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition: User token. It is obtained by calling the Obtaining an IAM User Token API.

Constraints: N/A

Range: Up to 65,534 characters.

Default Value: N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

name

String

Definition: Job name.

Range: 1 to 47 characters. Only letters, digits, and hyphens (-) are allowed.

endpoint_name

String

Definition: Endpoint name.

Range: 1 to 63 characters. Only lowercase letters, digits, and hyphens (-) are allowed. The value must start with a lowercase letter and end with a lowercase letter or digit.

config

RayJobConfig object

Definition: Ray job configuration. The key is the configuration item name, and the value is the configuration item value.

description

String

Definition: Description.

Range: 0 to 1,024 characters. Only letters, digits, underscores (_), hyphens (-), periods (.), and spaces are allowed.

id

String

Definition: Job ID. It can be obtained by calling the Listing Ray Jobs API.

Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed.

duration

Integer

Definition: Running duration, in seconds.

Range: N/A

submission_id

String

Definition: Unique ID of a Ray job.

Range: 0 to 64 characters.

endpoint_type

String

Definition: Endpoint type for the job.

Range

  • RAY_JOB: RayJob endpoint job.

  • RAY_CLUSTER: RayCluster endpoint job.

  • RAY_FEDERATION: Ray Federation endpoint job.

endpoint_id

String

Definition: Endpoint ID.

Range: 32 to 36 characters. Only letters, digits, and hyphens (-) are allowed.

federation_id

String

Definition: Federation ID.

Range: 32 to 36 characters. Only letters, digits, and hyphens (-) are allowed.

federation_name

String

Definition: Federation name.

Range: 1 to 63 characters.

create_time

String

Definition: Creation time. UTC time format: yyyy-MM-ddTHH:mm:ssZ. For example, 2023-05-30T12:24:30.401Z.

Range: N/A

update_time

String

Definition: Update time. UTC time format: yyyy-MM-ddTHH:mm:ssZ. For example, 2023-05-30T12:24:30.401Z.

Range: N/A

start_time

String

Definition: Job execution start time. UTC time format: yyyy-MM-ddTHH:mm:ssZ. For example, 2023-05-30T12:24:30.401Z.

Range: N/A

end_time

String

Definition: End time. UTC time format: yyyy-MM-ddTHH:mm:ssZ. For example, 2023-05-30T12:24:30.401Z.

Range: N/A

status

String

Definition: Running status.

Range

  • QUEUED: Queued.

  • PENDING: Pending.

  • RUNNING: Running.

  • CANCELING: Canceling.

  • CANCELED: Canceled.

  • FAILED: Failed.

  • QUEUED_TIMEOUT: Queued timeout.

  • RUNNING_TIMEOUT: Running timeout.

  • SUCCEEDED: Succeeded.

create_user

User object

Definition: Tenant information, including the account name, account ID, username, and user ID.

error

ErrorMessage object

Definition: Text message content returned on failure, including the error code, error description, and solution description.

history_server_enabled

Boolean

Definition: Whether the History Server feature is enabled for this job.

Range

  • true: History Server is enabled.

  • false: History Server is disabled.

Table 4 RayJobConfig

Parameter

Type

Description

entrypoint

String

Definition: Main script for running a job. When a job is run, the .zip file of the job script is automatically decompressed. If the first-level directory contains only one folder after decompression, that folder is automatically stripped. Therefore, you only need to specify the script file name, without including the parent directory.

Range: 1 to 102,400 characters.

runtime_env

RuntimeEnv object

Definition: Runtime environment configuration for a job.

image

V2ImageBriefInfo object

Definition: Image information.

resource_config

RayResourceConfig object

Definition: Ray node resource configuration.

rayjob_strategy

RayJobStrategy object

Definition: Ray job submission policy.

metadata

Map<String,String>

Definition: User-defined job metadata (key-value pairs).

Table 5 RuntimeEnv

Parameter

Type

Description

working_dir

String

Definition: Working directory where the code will run.

Range: 1 to 2048.

pip

Array of strings

Definition: A list of pip packages to install.

env_vars

Map<String,String>

Definition: Environment variables to set. The key is the environment variable name, and the value is the environment variable value. Both are of the String type.

config

Map<String,Object>

Definition: Runtime environment configuration. The key is the configuration item name, and the value is the configuration item value.

Table 6 V2ImageBriefInfo

Parameter

Type

Description

image_id

String

Definition: Image ID. For details about how to obtain it, see Listing Images.

Range: 32 to 36 characters. Only letters, digits, and hyphens (-) are allowed.

image_version_id

String

Definition: Image version ID. For details about how to obtain it, see Querying Details of an Image.

Range: 32 to 36 characters. Only letters, digits, and hyphens (-) are allowed.

Table 7 RayResourceConfig

Parameter

Type

Description

head_resource_spec

RayHeadResourceSpec object

Definition: Head resource configuration.

worker_resource_spec

Array of RayWorkerResourceSpec objects

Definition: Worker resource configuration.

Table 8 RayHeadResourceSpec

Parameter

Type

Description

cpu

Integer

Definition: Number of CPU cores, in millicores.

Range: The minimum value is 1000.

memory

Integer

Definition: Memory size for a single head node, in MB.

Range: The minimum value is 1024.

gpu

Double

Definition: Number of GPUs on a node.

Range: Must be greater than or equal to 1.0 and must be an integer value (e.g., 1.0, 2.0, 3.0, ...).

npu

Double

Definition: Number of NPUs on a node.

Range: Must be greater than or equal to 1.0 and must be an integer value (e.g., 1.0, 2.0, 3.0, ...).

Table 9 RayWorkerResourceSpec

Parameter

Type

Description

cpu

Integer

Definition: Number of CPU cores, in millicores.

Range: The minimum value is 1000.

memory

Integer

Definition: Memory size, in MB.

Range: The minimum value is 1024.

gpu

Double

Definition: Number of GPUs on a node.

Range: Must be greater than or equal to 1.0 and must be an integer value (e.g., 1.0, 2.0, 3.0, ...).

npu

Double

Definition: Number of NPUs on a node.

Range: Must be greater than or equal to 1.0 and must be an integer value (e.g., 1.0, 2.0, 3.0, ...).

worker_replicas

Integer

Definition: Number of worker replicas.

Range: 1 to 64

enable_autoscaling

Boolean

Definition: Specifies whether to enable auto scaling for worker nodes.

Range

  • true: Enable auto scaling. If this value is used, worker_min_replicas and worker_max_replicas must be set.

  • false: Disable auto scaling. If this value is used, worker_replicas must be set.

worker_min_replicas

Integer

Definition: Minimum number of worker replicas.

Range: 0 to 64

worker_max_replicas

Integer

Definition: Maximum number of worker replicas.

Range: 1 to 64

Table 10 RayJobStrategy

Parameter

Type

Description

queued_timeout

Integer

Definition: Job submission timeout. If the job has not started running after this time, the job fails. The unit is minute.

Range: 10 to 1440.

running_timeout

Integer

Definition: Job runtime timeout. If the job has not finished running after this time, the job will be canceled and marked as failed. The unit is minute.

Range: -1 to 10080 (-1 indicates no timeout is configured).

Table 11 User

Parameter

Type

Description

domain_name

String

Definition: Account name.

Range: 0 to 64 characters.

domain_id

String

Definition: Account ID.

Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed.

user_name

String

Definition: Username.

Range: 0 to 64 characters.

user_id

String

Definition: User ID.

Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed.

Table 12 ErrorMessage

Parameter

Type

Description

error_code

String

Definition: Error code.

Range: 8 to 36 characters.

error_msg

String

Definition: Error description.

Range: 2 to 512 characters.

solution_msg

String

Definition: Solution description.

Range: 0 to 4,096 characters.

Status code: 400

Table 13 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code.

Range: 8 to 36 characters.

error_msg

String

Definition: Error description.

Range: 2 to 512 characters.

solution_msg

String

Definition: Solution description.

Range: 0 to 4,096 characters.

Status code: 401

Table 14 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code.

Range: 8 to 36 characters.

error_msg

String

Definition: Error description.

Range: 2 to 512 characters.

solution_msg

String

Definition: Solution description.

Range: 0 to 4,096 characters.

Status code: 403

Table 15 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code.

Range: 8 to 36 characters.

error_msg

String

Definition: Error description.

Range: 2 to 512 characters.

solution_msg

String

Definition: Solution description.

Range: 0 to 4,096 characters.

Status code: 404

Table 16 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code.

Range: 8 to 36 characters.

error_msg

String

Definition: Error description.

Range: 2 to 512 characters.

solution_msg

String

Definition: Solution description.

Range: 0 to 4,096 characters.

Status code: 408

Table 17 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code.

Range: 8 to 36 characters.

error_msg

String

Definition: Error description.

Range: 2 to 512 characters.

solution_msg

String

Definition: Solution description.

Range: 0 to 4,096 characters.

Status code: 500

Table 18 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code.

Range: 8 to 36 characters.

error_msg

String

Definition: Error description.

Range: 2 to 512 characters.

solution_msg

String

Definition: Solution description.

Range: 0 to 4,096 characters.

Example Requests

View Ray job details.

GET /v2/workspaces/{workspace_id}/ray-jobs/{job_id}

Example Responses

Status code: 200

{
  "name" : "rayjob1",
  "description" : "rayjob1",
  "config" : {
    "entrypoint" : "echo helloworldstart;\\n sleep 100;\\necho helloworldend;\\n",
    "image" : {
      "image_id" : "2ca95307-9e39-4ab5-a101-7c05486977b4",
      "image_version_id" : "8952ce4a-86bb-4f24-95e8-f2091bfa3f49"
    },
    "resource_config" : {
      "head_resource_spec" : {
        "cpu" : 2000,
        "memory" : 4096,
        "gpu" : 1,
        "npu" : 1
      },
      "worker_resource_spec" : [ {
        "cpu" : 2000,
        "memory" : 4096,
        "gpu" : 1,
        "npu" : 1,
        "worker_replicas" : 1,
        "enable_autoscaling" : true,
        "worker_min_replicas" : 1,
        "worker_max_replicas" : 1
      } ]
    },
    "rayjob_strategy" : {
      "queued_timeout" : 180,
      "running_timeout" : 180
    }
  },
  "history_server_enabled" : false,
  "endpoint_name" : "ray-cpu-endpoint",
  "federation_name" : "ray-abc-federation",
  "id" : "019ef7e8-a783-78aa-bd98-6f56b32786c4",
  "duration" : 325,
  "create_time" : "2026-06-27T10:05:24.593+00:00",
  "update_time" : "2026-06-27T10:10:57.177+00:00",
  "start_time" : "2026-06-27T10:05:32.000+00:00",
  "end_time" : "2026-06-27T10:10:57.000+00:00",
  "status" : "SUCCEEDED",
  "create_user" : {
    "domain_name" : "your_domain_name",
    "domain_id" : "your-domain-id",
    "user_name" : "your_user_name",
    "user_id" : "your-user-id"
  },
  "error" : {
    "error_msg" : "Job finished successfully."
  }
}

Status code: 400

{
  "error_code" : "common.01000001",
  "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException",
  "solution_msg" : "Check whether the request parameters comply with the API definition and try again."
}

Status code: 401

{
  "error_code" : "APIG.1002",
  "error_msg" : "Incorrect token or token resolution failed",
  "solution_msg" : "Please check if auth token is included in the request header."
}

Status code: 403

{
  "error_code" : "APIG.1003",
  "error_msg" : "X-Auth-Token is invalid in the request",
  "solution_msg" : "Check whether the token in the request is valid and try again."
}

Status code: 404

{
  "error_code" : "common.01000001",
  "error_msg" : "response status exception, code: 404",
  "solution_msg" : "Please try to use correct info."
}

Status code: 408

{
  "error_code" : "common.00000408",
  "error_msg" : "timeout exception occurred",
  "solution_msg" : "The backend request timed out — check service health and network connectivity, then retry."
}

Status code: 500

{
  "error_code" : "common.00000500",
  "error_msg" : "internal error",
  "solution_msg" : "Contact operations for analysis."
}

Status Codes

Status Code

Description

200

Request succeeded.

400

Invalid request.

401

Unauthorized.

403

Request denied.

404

The requested resource could not be found.

408

Request timeout.

500

Internal server error.