Queries a list of instances. You can also specify filter conditions to query specific instances.
Operation description
This API operation is available for all DataWorks editions.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ProjectId | long | Yes | The DataWorks workspace ID. | 100 |
Bizdate | long | Yes | The data timestamp. | 1710239005403 |
TaskId | long | 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. | |
long | No | The task ID. | 1234 | |
TaskName | string | No | The name of the task. Fuzzy match is supported. | |
Owner | string | No | The account ID of the task owner. | 1000 |
TaskType | integer | 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 | long | No | The ID of the workflow to which the instance belongs. | 1234 |
WorkflowInstanceType | string | No | The type of the workflow instance. Valid values:
| Normal |
WorkflowInstanceId | long | No | The workflow instance ID. | 1234 |
ProjectEnv | string | No | The environment of the workspace. Valid values:
| Prod |
Id | long | 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. | |
long | 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 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "22C97E95-F023-56B5-8852-B1A77A17XXXX",
"PagingInfo": {
"TaskInstances": [
{
"TaskId": 1234,
"TaskType": "ODPS_SQL\n",
"TaskName": "",
"Description": "test\n",
"WorkflowId": 1234,
"WorkflowName": "",
"TriggerType": "Scheduler\n",
"TriggerRecurrence": "Normal\n",
"WorkflowInstanceId": 1234,
"WorkflowInstanceType": "Normal",
"Timeout": 1,
"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,
"TenantId": 1,
"ProjectId": 100,
"ProjectEnv": "Prod",
"Owner": "1000",
"CreateTime": 1710239005403,
"ModifyTime": 1710239005403,
"CreateUser": "1000",
"ModifyUser": "1000"
}
],
"TotalCount": 100,
"PageSize": 10,
"PageNumber": 1
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-11-21 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2024-11-20 | The request parameters of the API has changed. The response structure of the API has changed | View Change Details |