Querying a Job
Function
This API is used to query jobs.
URI
GET /v1.1/{project_id}/clusters/{cluster_id}/cdm/job/{job_name}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID |
cluster_id |
Yes |
String |
Cluster ID |
job_name |
Yes |
String |
Job name. When this parameter is set to all, all jobs are to be queried. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
filter |
No |
String |
When job_name is all, this parameter is used for fuzzy job filtering. |
page_no |
No |
Integer |
Page number Minimum: 1 |
page_size |
No |
Integer |
Number of jobs on each page. The value ranges from 10 to 100. Minimum: 10 Maximum: 100 |
jobType |
No |
String |
Type of the jobs to be queried
Enumeration values:
|
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
Number of jobs |
jobs |
Array of Job objects |
Job list. For details, see the descriptions of jobs parameters. |
page_no |
Integer |
Page number. Jobs on the specified page will be returned. |
page_size |
Integer |
Number of jobs on each page. |
Parameter |
Type |
Description |
---|---|---|
job_type |
String |
Job type
Enumeration values:
|
from-connector-name |
String |
Source link type |
to-config-values |
ConfigValues object |
Destination link parameter configuration |
to-link-name |
String |
Destination link name |
driver-config-values |
ConfigValues object |
Job parameter configuration |
from-config-values |
ConfigValues object |
Source link parameter configuration |
to-connector-name |
String |
Destination link type |
name |
String |
Job name, which contains 1 to 240 characters Minimum: 1 Maximum: 240 |
from-link-name |
String |
Source link name |
creation-user |
String |
User who created the job |
creation-date |
Long |
Time when the job was created, accurate to millisecond |
update-date |
Long |
Time when the job was last updated, accurate to millisecond |
is_incre_job |
Boolean |
Incremental or not |
flag |
Integer |
Flag |
files_read |
Integer |
Number of read files |
update-user |
String |
User who last updated the job |
external_id |
String |
External ID |
type |
String |
Task type |
execute_start_date |
Long |
Execution start date |
delete_rows |
Integer |
Number of deleted rows |
enabled |
Boolean |
Whether to activate the link |
bytes_written |
Long |
Number of written bytes |
id |
Integer |
Job ID |
is_use_sql |
Boolean |
Whether to use SQL statements |
update_rows |
Integer |
Number of updated rows |
group_name |
String |
Group name |
bytes_read |
Long |
Number of read bytes |
execute_update_date |
Long |
Execution update date |
write_rows |
Integer |
Number of written rows |
rows_written |
Integer |
Number of written rows |
rows_read |
Long |
Number of rows that are read |
files_written |
Integer |
Number of written files |
is_incrementing |
Boolean |
Incremental or not |
execute_create_date |
Long |
Execution creation date |
status |
String |
Job execution status
|
Parameter |
Type |
Description |
---|---|---|
configs |
Array of configs objects |
The data structures of source link parameters, destination link parameters, and job parameters are the same. However, the inputs parameter varies. For details, see the descriptions of configs parameters. |
Parameter |
Type |
Description |
---|---|---|
inputs |
Array of Input objects |
Input parameter list. Each element in the list is in name,value format. For details, see the descriptions of inputs parameters. In the from-config-values data structure, the value of this parameter varies with the source link type. For details, see section "Source Job Parameters" in the Cloud Data Migration User Guide. In the to-cofig-values data structure, the value of this parameter varies with the destination link type. For details, see section "Destination Job Parameters" in the Cloud Data Migration User Guide. For details about the inputs parameter in the driver-config-values data structure, see the job parameter descriptions. |
name |
String |
Configuration name. The value is fromJobConfig for a source job, toJobConfig for a destination job, and linkConfig for a link. |
id |
Integer |
Configuration ID |
type |
String |
Configuration type |
Example Requests
GET /v1.1/1551c7f6c808414d8e9f3c514a170f2e/clusters/6ec9a0a4-76be-4262-8697-e7af1fac7920/cdm/job/all?jobType=NORMAL_JOB
Example Responses
Status code: 200
ok
{ "total" : 1, "jobs" : [ { "job_type" : "NORMAL_JOB", "from-connector-name" : "elasticsearch-connector", "to-config-values" : { "configs" : [ { "inputs" : [ { "name" : "toJobConfig.streamName", "value" : "dis-lkGm" }, { "name" : "toJobConfig.separator", "value" : "|" }, { "name" : "toJobConfig.columnList", "value" : "1&2&3" } ], "name" : "toJobConfig" } ] }, "to-link-name" : "dis", "driver-config-values" : { "configs" : [ { "inputs" : [ { "name" : "throttlingConfig.numExtractors", "value" : "1" }, { "name" : "throttlingConfig.submitToCluster", "value" : "false" }, { "name" : "throttlingConfig.numLoaders", "value" : "1" }, { "name" : "throttlingConfig.recordDirtyData", "value" : "false" } ], "name" : "throttlingConfig" }, { "inputs" : { }, "name" : "jarConfig" }, { "inputs" : [ { "name" : "schedulerConfig.isSchedulerJob", "value" : "false" }, { "name" : "schedulerConfig.disposableType", "value" : "NONE" } ], "name" : "schedulerConfig" }, { "inputs" : { }, "name" : "transformConfig" }, { "inputs" : [ { "name" : "retryJobConfig.retryJobType", "value" : "NONE" } ], "name" : "retryJobConfig" } ] }, "from-config-values" : { "configs" : [ { "inputs" : [ { "name" : "fromJobConfig.index", "value" : "52est" }, { "name" : "fromJobConfig.type", "value" : "est_array" }, { "name" : "fromJobConfig.columnList", "value" : "array_f1_int:long&array_f2_text:string&array_f3_object:nested" }, { "name" : "fromJobConfig.splitNestedField", "value" : "false" } ], "name" : "fromJobConfig" } ] }, "to-connector-name" : "dis-connector", "name" : "es_css", "from-link-name" : "css" } ], "page_no" : 1, "page_size" : 10 }
Status Codes
Status Code |
Description |
---|---|
200 |
ok |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot