Updated on 2025-08-06 GMT+08:00

Querying Batch Job Details

Function

This API is used to query details about a batch processing job based on the job ID.

URI

  • URI format

    GET /v2.0/{project_id}/batches/{batch_id}

  • Parameter description
    Table 1 URI parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Definition

    Project ID, which is used for resource isolation. For how to obtain a project ID, see Obtaining a Project ID.

    Example: 48cc2c48765f481480c7db940d6409d1

    Constraints

    None

    Range

    The value can contain up to 64 characters. Only letters and digits are allowed.

    Default Value

    None

    batch_id

    Yes

    String

    Definition

    ID of a batch processing job. For details about how to obtain an ID, see appId in the response parameters in Listing Batch Processing Jobs.

    Example: 0a324461-d9d9-45da-a52a-3b3c7a3d809e

    Constraints

    The parameter value must be a string matching the regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$.

    Range

    None

    Default Value

    None

Request Parameters

None

Response Parameters

Table 2 Response parameters

Parameter

Mandatory

Type

Description

id

No

String

Definition

ID of a batch processing job, which is in the universal unique identifier (UUID) format

Range

None

appId

No

String

Definition

Back-end application ID of a batch processing job.

Range

None

name

No

String

Definition

Name of a batch processing job.

Range

None

owner

No

String

Definition

Owner of a batch processing job.

Range

None

proxyUser

No

String

Definition

Proxy user (resource tenant) to which a batch processing job belongs.

Range

None

state

No

String

Definition

Status of a batch processing job. For details, see Table 7 in Creating a Batch Processing Job.

Range

None

kind

No

String

Definition

Type of a batch processing job. Only Spark parameters are supported.

Range

None

log

No

Array of Strings

Definition

Last 10 records of the current batch processing job.

Range

None

sc_type

No

String

Definition

Type of a computing resource. If the computing resource type is customized, value CUSTOMIZED is returned.

Range

None

cluster_name

No

String

Definition

Queue where a batch processing job is located.

Range

None

queue

No

String

Definition

Queue where a batch processing job is located.

Range

None

create_time

No

Long

Definition

Time when a batch processing job is created. The timestamp is expressed in milliseconds.

Range

None

update_time

No

Long

Definition

Time when a batch processing job is updated. The timestamp is expressed in milliseconds.

Range

None

feature

No

String

Definition

Job feature. Type of the Spark image used by a job.

Range

  • basic: indicates that the basic Spark image provided by DLI is used.
  • custom: indicates that the user-defined Spark image is used.
  • ai: indicates that the AI image provided by DLI is used.

spark_version

No

String

Definition

Version of the Spark component used by a job. Set this parameter when feature is set to basic or ai. If this parameter is not set, the default Spark component version 2.3.2 is used.

Range

None

image

No

String

Definition

Custom image. The format is Organization name/Image name:Image version.

Range

This parameter is valid only when feature is set to custom. You can use this parameter with the feature parameter to specify a user-defined Spark image for job running. For details about how to use custom images, see .

req_body

No

String

Definition

Request parameter details.

Range

None

Example Request

None

Example Response

{
    "id": "0a324461-d9d9-45da-a52a-3b3c7a3d809e",
    "appId": "",
    "name": "",
    "owner": "",
    "proxyUser": "",
    "state": "starting",
    "kind":"",
    "log": [
           "stdout: ",
            "stderr: ",
            "YARN Diagnostics: "
    ],
    "sc_type": "A",
    "cluster_name": "test",
    "queue": "test",
    "create_time": 1531906043036,
    "update_time": 1531906043036
}

Status Codes

Table 3 describes the status code.

Table 3 Status codes

Status Code

Description

200

The query is successful.

400

Request error.

500

Internal service error.

Error Codes

If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see Error Codes.