This API is used to view a job instance list.
A job instance is generated each time you run a batch job for which periodic scheduling or event-based scheduling is configured. If a real-time job contains a node for which periodic scheduling or event-based scheduling is configured, you can call this API to view the instance list of the subjobs associated with the node. The format of the jobName parameter is real-time job name_node name.
GET /v1/{project_id}/jobs/instances/detail?jobName={jobName}&minPlanTime={minPlanTime}&maxPlanTime={maxPlanTime}&limit={limit}&offset={offset}&status={status}&instanceType={instanceType}&preciseQuery={preciseQuery}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain a project ID, see Project ID and Account ID. |
jobName |
No |
String |
Job name.
|
minPlanTime |
No |
Long |
Minimum planned job execution time in milliseconds. Job instances whose start time is greater than this time are returned. |
maxPlanTime |
No |
Long |
Minimum planned job execution time in milliseconds. Job instances whose start time is less than this time are returned. |
limit |
No |
int |
The maximum number of records on each page. The parameter value ranges from 1 to 1000. Default value: 10 |
offset |
No |
int |
Start page of the paging list. The default value is 0. The value must be greater than or equal to 0. |
status |
No |
String |
Job instance status.
|
instanceType |
No |
int |
Job scheduling modes.
|
preciseQuery |
No |
boolean |
Whether exact search of jobs by name is supported |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
workspace |
No |
String |
Workspace ID.
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
total |
Yes |
int |
Total number of records. |
instances |
Yes |
List<Instance> |
Job instance status. For details, see Table 4. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
jobName |
Yes |
String |
Job name. When you view the instance list of a specified batch job, jobName is the name of the batch job. When you view the subjobs associated with a node in a real-time job, jobName is in format of real-time job name_node name. |
jobId |
No |
String |
Job ID |
jobInstanceName |
Yes |
String |
Name of a job instance recorded by the log, rather than the name defined during job creation |
status |
Yes |
String |
Job instance status.
|
planTime |
Yes |
Long |
Planned execution time of the job instance. |
startTime |
Yes |
Long |
Actual execution start time of the job instance. |
endTime |
No |
Long |
Actual execution end time of the job instance. |
executeTime |
No |
Long |
Execution duration in milliseconds. |
instanceId |
Yes |
Long |
Job instance ID, which is used to query job instance details. |
submitTime |
Yes |
Long |
Time when a job is submitted. |
instanceType |
Yes |
int |
Job scheduling modes.
|
forceSuccess |
No |
boolean |
Whether the job instance status is forcibly successful Default value: false |
ignoreSuccess |
No |
boolean |
Whether the job instance status is failure ignored Default value: false |
version |
No |
String |
Job instance version |
GET /v1/b384b9e9ab9b4ee8994c8633aabc9505/jobs/instances/detail?jobName=job_batch
{ "total": 2, "instances": [{ "endTime": 1551671598000, "executeTime": 0.3, "forceSuccess": false, "ignoreSuccess": false, "instanceId": 34765, "instanceType": 2, "jobId": 608627, "jobName": "job_batch", "jobInstanceName": "job_batch", "planTime": 1551671580000, "startTime": 1551671580000, "status": "success", "submitTime": 1550910278706, "version": 1 }, { "endTime": 1551671538000, "executeTime": 0.3, "forceSuccess": false, "ignoreSuccess": false, "instanceId": 34764, "instanceType": 5, "jobId": 608627, "jobName": "job_batch", "jobInstanceName": "job_batch", "planTime": 1551671520000, "startTime": 1551671521000, "status": "success", "submitTime": 1550910278706, "version": 1 }] }