Queries a list of instances. You can also specify filter conditions to query specific instances.
Operation description
You must purchase DataWorks Basic Edition or a higher edition to use this feature.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:ListTaskInstances |
get |
*TaskInstance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
integer |
Yes |
The DataWorks workspace ID. |
100 |
| Bizdate |
integer |
Yes |
The data timestamp. The value of this parameter is 00:00:00 of the day before the scheduling time of the instance. The value is a UNIX timestamp. Unit: milliseconds. Example: 1743350400000. |
1710239005403 |
| TaskId |
integer |
No |
The ID of the task for which the instance is generated. |
1234 |
| TaskIds |
array |
No |
The IDs of the tasks. You can query multiple instances at a time by task ID. |
|
|
integer |
No |
The task ID. |
1234 |
|
| TaskName |
string |
No |
The name of the task. Fuzzy match is supported. |
SQL node |
| Owner |
string |
No |
The account ID of the task owner. |
1000 |
| TaskType |
string |
No |
The type of the task for which the instance is generated. |
ODPS_SQL |
| RuntimeResource |
string |
No |
The information about the resource group. Set this parameter to the identifier of a resource group for scheduling. |
S_res_group_524258031846018_1684XXXXXXXXX |
| WorkflowId |
integer |
No |
The ID of the workflow to which the instance belongs. |
1234 |
| UnifiedWorkflowInstanceId |
integer |
No |
The unified workflow instance ID. For all task instances under a specific data timestamp within a single trigger, this field has the same value. |
1234 |
| WorkflowInstanceType |
string |
No |
The type of the workflow instance. Valid values:
|
Normal |
| WorkflowInstanceId |
integer |
No |
The workflow instance ID. |
1234 |
| ProjectEnv |
string |
No |
The environment of the workspace. Valid values:
|
Prod |
| Id |
integer |
No |
The ID of the instance. The instance may be rerun. If the instance is rerun and you configure this parameter, the system returns the historical information of the instance, including the rerun information. You can use the RunNumber parameter to distinguish each entry in the historical information. |
1234 |
| Ids |
array |
No |
The IDs of the instances. You can query multiple instances at a time by instance ID. |
|
|
integer |
No |
The ID of the instance. |
1234 |
|
| TriggerType |
string |
No |
The trigger type. Valid values:
|
Normal |
| TriggerRecurrence |
string |
No |
The running mode of the instance after it is triggered. This parameter takes effect only if the TriggerType parameter is set to Scheduler. Valid values:
|
Normal |
| SortBy |
string |
No |
The field used for sorting. Fields such as TriggerTime and StartedTime are supported. The value of this parameter is in the Sort field + Sort by (Desc/Asc) format. By default, results are sorted in ascending order. Valid values:
|
Id Desc |
| PageSize |
integer |
No |
The number of entries per page. Default value: 10. |
10 |
| PageNumber |
integer |
No |
The page number. Pages start from page 1. Default value: 1. |
1 |
| Status |
string |
No |
The status of the task instance.
|
Success |
| Filter |
string |
No |
The filter. It is in JSON format, and multiple filter conditions are combined with a logical AND. Currently supported fields include: |
{ "startedTimeStart": "1763481600000", "startedTimeEnd": "1763481600000", "finishedTimeStart": "1763481600000", "finishedTimeEnd": "1763481600000", "createTimeStart": "1763481600000", "createTimeEnd": "1763481600000" } |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
22C97E95-F023-56B5-8852-B1A77A17XXXX |
| PagingInfo |
object |
Pagination information. |
|
| TaskInstances |
array<object> |
The list of task instances. |
|
|
array<object> |
|||
| TaskId |
integer |
The ID of the task for which the instance is generated. |
1234 |
| TaskType |
string |
The type of the task for which the instance is generated. |
ODPS_SQL |
| TaskName |
string |
The name of the task for which the instance is generated. |
SQL node |
| Description |
string |
The description. |
test |
| WorkflowId |
integer |
The ID of the workflow to which the instance belongs. |
1234 |
| WorkflowName |
string |
The name of the workflow to which the instance belongs. |
Test workflow |
| TriggerType |
string |
The trigger type. Valid values:
|
Scheduler |
| TriggerRecurrence |
string |
The running mode of the instance after it is triggered. This parameter takes effect only if the TriggerType parameter is set to Scheduler. Valid values:
|
Normal |
| WorkflowInstanceId |
integer |
The workflow instance ID. |
1234 |
| UnifiedWorkflowInstanceId |
integer |
Unified workflow instance ID. All task instances triggered under the same data timestamp share the same value for this field. |
1234 |
| WorkflowInstanceType |
string |
The type of the workflow instance. Valid values:
|
Normal |
| Timeout |
integer |
The timeout period of task running. Unit: seconds. Note: The value of this parameter is rounded up by hour. |
3600 |
| RerunMode |
string |
The rerun mode Valid values:
|
AllAllowed |
| RunNumber |
integer |
The number of times the task is run. By default, the value starts from 1. |
1 |
| PeriodNumber |
integer |
The sequence number of the cycle. This parameter indicates the cycle of the task instance on the current day. |
1 |
| BaselineId |
integer |
The baseline ID. |
1234 |
| Priority |
integer |
The priority of the task. Minimum value: 1. Maximum value: 8. A larger value indicates a higher priority. Default value: 1. |
1 |
| RuntimeResource |
object |
The information about the resource group with which the instance is associated. |
|
| ResourceGroupId |
string |
The ID of the resource group for scheduling configured for task running. |
S_res_group_524258031846018_1684XXXXXXXXX |
| Image |
string |
The ID of the image configured for task running. |
i-xxxxxx |
| Cu |
string |
The default number of CUs configured for task running. |
0.25 |
| Runtime |
object |
The runtime information about the instance. |
|
| ProcessId |
string |
The instance run ID. |
T3_123 |
| Gateway |
string |
The host for running. |
cn-shanghai.1.2 |
| DataSource |
object |
The information about the associated data source. |
|
| Name |
string |
The name of the data source. |
mysql_test |
| Status |
string |
The status of the instance. Valid values:
|
Success |
| TriggerTime |
integer |
The scheduling time. |
1710239005403 |
| Bizdate |
integer |
The data timestamp. |
1710239005403 |
| StartedTime |
integer |
The time when the instance started to run. |
1710239005403 |
| FinishedTime |
integer |
The time when the instance finished running. |
1710239005403 |
| Id |
integer |
The instance ID. |
1234 |
| ProjectId |
integer |
The DataWorks workspace ID. |
100 |
| ProjectEnv |
string |
The environment of the workspace. Valid values:
|
Prod |
| Owner |
string |
The account ID of the task owner. |
1000 |
| CreateTime |
integer |
The creation time. |
1710239005403 |
| ModifyTime |
integer |
The modification time. |
1710239005403 |
| CreateUser |
string |
The account ID of the user who creates the instance. |
1000 |
| ModifyUser |
string |
The account ID of the user who modifies the instance. |
1000 |
| ScriptParameters |
string |
The script parameter list. |
para1=val1 para2=val2 |
| WaitingResourceTime |
integer |
The timestamp for when it started waiting for resources. |
1710239005403 |
| WaitingTriggerTime |
integer |
The timestamp for when it started waiting for the scheduled time. |
1710239005403 |
| TotalCount |
integer |
The total number of entries returned. |
100 |
| PageSize |
integer |
The number of entries per page. |
10 |
| PageNumber |
integer |
The page number. |
1 |
Examples
Success response
JSON format
{
"RequestId": "22C97E95-F023-56B5-8852-B1A77A17XXXX",
"PagingInfo": {
"TaskInstances": [
{
"TaskId": 1234,
"TaskType": "ODPS_SQL\n",
"TaskName": "SQL node\n",
"Description": "test\n",
"WorkflowId": 1234,
"WorkflowName": "Test workflow\n",
"TriggerType": "Scheduler\n",
"TriggerRecurrence": "Normal\n",
"WorkflowInstanceId": 1234,
"UnifiedWorkflowInstanceId": 1234,
"WorkflowInstanceType": "Normal",
"Timeout": 3600,
"RerunMode": "AllAllowed\n",
"RunNumber": 1,
"PeriodNumber": 1,
"BaselineId": 1234,
"Priority": 1,
"RuntimeResource": {
"ResourceGroupId": "S_res_group_524258031846018_1684XXXXXXXXX",
"Image": "i-xxxxxx\n",
"Cu": "0.25\n"
},
"Runtime": {
"ProcessId": "T3_123\n",
"Gateway": "cn-shanghai.1.2\n"
},
"DataSource": {
"Name": "mysql_test\n"
},
"Status": "Success",
"TriggerTime": 1710239005403,
"Bizdate": 1710239005403,
"StartedTime": 1710239005403,
"FinishedTime": 1710239005403,
"Id": 1234,
"ProjectId": 100,
"ProjectEnv": "Prod",
"Owner": "1000",
"CreateTime": 1710239005403,
"ModifyTime": 1710239005403,
"CreateUser": "1000",
"ModifyUser": "1000",
"ScriptParameters": "para1=val1 para2=val2",
"WaitingResourceTime": 1710239005403,
"WaitingTriggerTime": 1710239005403
}
],
"TotalCount": 100,
"PageSize": 10,
"PageNumber": 1
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.