ListInstances
Retrieves a list of instances.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:* |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectEnv |
string |
Yes |
The runtime environment. Valid values:
Valid values:
|
PROD |
| NodeId |
integer |
No |
The node ID. You can call ListNodes to query the node ID. |
100000000000 |
| NodeName |
string |
No |
The node name. You can call ListNodes to query the node name. |
openmr_8**** |
| Owner |
string |
No |
The ID of the owner, which is the UID of the workspace administrator. You can logon to the Alibaba Cloud Management Console and view the UID in the Security Settings section of the account management page. |
193379**** |
| ProjectId |
integer |
Yes |
The workspace ID. You can call ListProjects to query the workspace ID. |
12345 |
| BizName |
string |
No |
The name of the workflow. You can call ListBusiness to query workflow information. |
test_bizName |
| ProgramType |
string |
No |
The node type. You can call ListNodes to query the node type. |
ODPS_SQL |
| PageNumber |
integer |
No |
The page number. Minimum value: 1. Maximum value: 100. |
1 |
| PageSize |
integer |
No |
The number of entries per page. Default value: 10. Maximum value: 100. |
10 |
| DagId |
integer |
No |
The DAG ID. The DagId can be the DagId returned by operations such as RunCycleDagNodes for data backfill, RunSmokeTest for smoke testing, and RunManualDagNodes for manual workflows. |
11111 |
| Bizdate |
string |
No |
The date for which to retrieve the instance list. Format: yyyy-MM-dd HH:mm:ss. |
2020-02-02 00:00:00 |
| BeginBizdate |
string |
No |
The start date for which to retrieve the instance list. Format: yyyy-MM-dd HH:mm:ss. |
2020-02-02 00:00:00 |
| EndBizdate |
string |
No |
The end date for which to retrieve the instance list. Format: yyyy-MM-dd HH:mm:ss. |
2020-02-03 00:00:00 |
| Status |
string |
No |
The status of the node. Valid values:
|
NOT_RUN |
| OrderBy |
string |
No |
The sorting rule for the returned results. Valid values:
Valid values:
|
INSTANCE_ID_DESC |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| RequestId |
string |
The request ID. You can use this ID to locate logs and troubleshoot issues. |
E6F0DBDD-5AD**** |
| ErrorMessage |
string |
The error message. |
The project does not exist. |
| ErrorCode |
string |
The error code. |
Invalid.Tenant.ProjectNotExists |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| Data |
object |
The list of instances. |
|
| PageNumber |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries per page. Default value: 10. Maximum value: 100. |
10 |
| TotalCount |
integer |
The total number of instances. |
66 |
| Instances |
array<object> |
The instance information. |
|
|
object |
The returned data. |
||
| Status |
string |
The status of the node. Valid values:
|
NOT_RUN |
| CycTime |
integer |
The scheduled runtime of the node. The value is a 13-digit number, such as |
1590422400000 |
| BeginRunningTime |
integer |
The time when the instance started running. The value is a 13-digit number, such as |
1590416703313 |
| FinishTime |
integer |
The time when the scheduled node finished running. The value is a 13-digit number, such as |
1590416703313 |
| ErrorMessage |
string |
[Deprecated] The error message of the instance run. You can call GetInstanceLog to obtain the error information of the executed task. |
error message |
| CreateTime |
integer |
The time when the instance was created. The value is a 13-digit number, such as |
1590416703313 |
| DagId |
integer |
The workflow ID. |
33845 |
| Priority |
integer |
The priority of the instance. Valid values: 1, 3, 5, 7, and 8. A larger value indicates a higher priority. Default value: 1. |
1 |
| TaskType |
string |
The scheduling type of the task instance. Valid values:
|
NORMAL(0) |
| ParamValues |
string |
The parameter information. |
bizdate=$bizdate tbods=$tbods |
| Connection |
string |
The connection string. |
odps_source |
| BaselineId |
integer |
The baseline ID. |
123123 |
| DqcType |
integer |
The DQC type. Valid values:
|
1 |
| DagType |
string |
The type of the workflow. Valid values:
|
DAILY |
| BusinessId |
integer |
The business process ID. |
123 |
| TaskRerunTime |
integer |
The number of remaining reruns for the instance. The value can be empty or an integer greater than or equal to 0.
|
0 |
| ModifyTime |
integer |
The time when the scheduled node was last modified. The value is a 13-digit number, such as |
1590416703313 |
| Repeatability |
boolean |
Indicates whether the instance task can be rerun. |
true |
| RepeatInterval |
integer |
The interval at which the node is rescheduled after a failure. Unit: milliseconds. |
60000 |
| InstanceId |
integer |
The instance ID. |
1234 |
| BeginWaitResTime |
integer |
The time when the instance started waiting for resources. The value is a 13-digit number, such as |
1590416703313 |
| RelatedFlowId |
integer |
The ID of the associated business process. |
123456 |
| Bizdate |
integer |
The business date of the scheduled node. This is typically the day before the node runs. The value is a 13-digit number, such as |
1590336000000 |
| NodeName |
string |
The node name. |
kzh |
| BeginWaitTimeTime |
integer |
The time when the instance started waiting for scheduling. The value is a 13-digit number, such as |
1590416703313 |
| DqcDescription |
string |
The DQC partitioning rule string. |
[{"projectName":"ztjy_dim","tableName":"dim_user_agent_manage_area_a","partition":"ds\u003d$[yyyy-mm-dd-1]"}] |
| NodeId |
integer |
The node ID. |
33115 |
| CreateUser |
string |
The user who triggered the instance to run. For example, if user Test triggered a data backfill instance, the CreateUser is Test. |
Test |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"RequestId": "E6F0DBDD-5AD****",
"ErrorMessage": "The project does not exist.",
"ErrorCode": "Invalid.Tenant.ProjectNotExists",
"Success": true,
"Data": {
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 66,
"Instances": [
{
"Status": "NOT_RUN",
"CycTime": 1590422400000,
"BeginRunningTime": 1590416703313,
"FinishTime": 1590416703313,
"ErrorMessage": "error message",
"CreateTime": 1590416703313,
"DagId": 33845,
"Priority": 1,
"TaskType": "NORMAL(0)",
"ParamValues": "bizdate=$bizdate tbods=$tbods",
"Connection": "odps_source",
"BaselineId": 123123,
"DqcType": 1,
"DagType": "DAILY",
"BusinessId": 123,
"TaskRerunTime": 0,
"ModifyTime": 1590416703313,
"Repeatability": true,
"RepeatInterval": 60000,
"InstanceId": 1234,
"BeginWaitResTime": 1590416703313,
"RelatedFlowId": 123456,
"Bizdate": 1590336000000,
"NodeName": "kzh",
"BeginWaitTimeTime": 1590416703313,
"DqcDescription": "[{\"projectName\":\"ztjy_dim\",\"tableName\":\"dim_user_agent_manage_area_a\",\"partition\":\"ds\\u003d$[yyyy-mm-dd-1]\"}]",
"NodeId": 33115,
"CreateUser": "Test"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.