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
¶ Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID.
batch_id
Yes
String
ID of a batch processing job.
Request¶
None
Response¶
Parameter | Mandatory | Type | Description |
---|---|---|---|
id | No | String | ID of a batch processing job. |
appId | No | String | Back-end application ID of a batch processing job. |
name | No | String | Name of a batch processing job. |
owner | No | String | Owner of a batch processing job. |
proxyUser | No | String | Proxy user (resource tenant) to which a batch processing job belongs. |
state | No | String | Status of a batch processing job. For details, see Table 7 in Creating a Batch Processing Job. |
kind | No | String | Type of a batch processing job. Only Spark parameters are supported. |
log | No | Array of Strings | Last 10 records of the current batch processing job. |
sc_type | No | String | Type of a computing resource. If the computing resource type is customized, value CUSTOMIZED is returned. |
cluster_name | No | String | Queue where a batch processing job is located. |
queue | No | String | Queue where a batch processing job is located. |
create_time | No | Long | Time when a batch processing job is created. The timestamp is expressed in milliseconds. |
update_time | No | Long | Time when a batch processing job is updated. The timestamp is expressed in milliseconds. |
req_body | No | String | Request parameter details. |
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.
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.