Querying Job Details
Function
This API is used to query details of a job.
URI
- URI format
GET /v1.0/{project_id}/job/{job_id}
- Parameter description
Table 1 URI parameter description Parameter
Mandatory
Description
project_id
Yes
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.
Request
None
Response
- Example response
{ "message_id": "CS.10001", "message": "The query of job details succeeds.", "current_time": 1533686888000, "payload": { "job_id": 50320, "name": "my_job_001", "desc": "This is my job.", "job_type": "flink_jar_job", "status": "job_running", "status_desc": "", "create_time": 1516952710040, "start_time": 1516952710740, "user_id": "ac4eaa303639409c8ab099d55eb1538e", "cluster_id": 100000, "project_id": "5a3314075bfa49b9ae360f4ecd333695", "sql_body": "select * from source_table", "run_mode": "shared_cluster", "spu_number": 0, "parallel_number": 0, "job_config": { "checkpoint_enabled": true, "checkpoint_mode": "exactly_once", "checkpoint_interval": 0, "log_enabled": true, "obs_bucket": "string", "smn_topic": "cs_job_exception", "root_id": 0, "edge_group_ids": "62de1e1c-066e-48a8-a79d-f461a31b2ee1,2eb00f85-99f2-4144-bcb7-d39ff47f9002" }, "jar_url": "cs-flink-jar/52818/WindowJoin.jar", "main_class": "org.apache.spark.examples.streaming.JavaQueueStream", "args": "", "execution_graph": "", "update_time": 1516952770835 } } - Parameter description
Table 2 Response parameters Parameter
Mandatory
Type
Description
message_id
No
String
Message type ID.
message
No
String
Message content.
current_time
No
Int
Current time, expressed by milliseconds.
payload
No
None
Information about a job list.
job_id
No
Long
Job ID.
name
No
String
Job name.
desc
No
String
Job description.
job_type
No
String
Job type.
status
No
String
Available job statuses are as follows:
- Draft
- Running
- Idle
- Finished
- Stopped
- Submitting
- Submission failed
- Running exception
- Stopping
- Stopping failed
- Stopped due to arrears
- Restoring (recharged jobs)
- Creating savepoint
status_desc
No
String
Description of job status.
create_time
No
Long
Timestamp when a job is created.
start_time
No
Long
Timestamp when a job is started.
user_id
No
Long
ID of the user who creates the job.
cluster_id
No
Int
Resource ID of an exclusive cluster. Ensure that the current user has been authorized to use resources of the exclusive cluster.
project_id
No
String
ID of the project to which a job belongs.
sql_body
No
String
SQL content in a Stream SQL job.
run_mode
No
String
Job running mode. The options are as follows:
- shared_cluster: indicates that the job is running on a shared cluster.
- exclusive_cluster: indicates that the job is running on an exclusive cluster.
- edge_node: indicates that the job is running on an edge node.
spu_number
No
Int
Number of SPUs selected for a job.
parallel_number
No
Int
Number of parallel jobs set by a user.
job_config
No
None
Job configuration. This parameter is valid only when show_detail is set to true.
checkpoint_enabled
No
Boolean
Whether to enable the automatic job snapshot function.
- true: indicates to enable the automatic job snapshot function.
- false: indicates to disable the automatic job snapshot function.
- Default value: false
checkpoint_mode
No
String
Snapshot mode. Available options are as follows:
- ExactlyOnce
- AtLeastOnce
checkpoint_interval
No
Int
Snapshot interval, expressed by seconds.
log_enabled
No
boolean
Whether to enable the log saving function.
obs_bucket
No
String
OBS path where users are authorized to save the snapshot. This parameter is valid only when is_checkpoint is set to true.
smn_topic
No
String
If a job fails to work, CS pushes alarm information to the SMN topic.
root_id
No
Int
Parent job ID.
edge_group_ids
No
String
List of edge computing group IDs. Use commas (,) to separate multiple IDs.
jar_url
No
String
OBS path of the JAR package.
main_class
No
String
OBS path where users are authorized to save the snapshot. This parameter is valid only when checkpoint_enabled is set to true.
args
No
String
Job running parameter of the JAR package.
execution_graph
No
String
Job execution plan.
update_time
No
Int
Time when a job is updated.
Status Code
| Status Code | Description |
|---|---|
| 200 | Querying details of a job succeeds. |
| 400 | The input parameters are invalid. |
Error Code
For details, see Error Codes.
Last Article: Querying the List of Jobs
Next Article: Querying the Job Execution Plan
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.