ListInstances

Updated at:

Queries a list of instances.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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: PROD (production environment) and DEV (development environment).

Valid values:

  • PROD :

    production environment.

  • DEV :

    development environment.

PROD

NodeId

integer

No

The ID of the node. You can call the ListNodes operation to query the node ID.

100000000000

NodeName

string

No

The name of the node. You can call the ListNodes operation 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 log on to the Alibaba Cloud Management Console and view the account UID in Security Management under Account Management.

193379****

ProjectId

integer

Yes

The ID of the workspace. You can call the ListProjects operation to query the workspace ID.

12345

BizName

string

No

The name of the workflow. You can call the ListBusiness operation to query the workflow information.

test_bizName

ProgramType

string

No

The type of the node. You can call the ListNodes operation 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 to return on each page. Default value: 10. Maximum value: 100.

10

DagId

integer

No

The ID of the directed acyclic graph (DAG). The value can be the DagId returned by operations such as RunCycleDagNodes for backfilling data, RunSmokeTest for smoke testing, and RunManualDagNodes for running manual workflows.

11111

Bizdate

string

No

The date for querying the instance list. Format: yyyy-MM-dd HH:mm:ss.

2020-02-02 00:00:00

BeginBizdate

string

No

The start date for querying the instance list. Format: yyyy-MM-dd HH:mm:ss.

2020-02-02 00:00:00

EndBizdate

string

No

The end date for querying 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: The node is not run.

  • WAIT_TIME: The node is waiting for the scheduled time.

  • WAIT_RESOURCE: The node is waiting for resources.

  • RUNNING: The node is running.

  • CHECKING: The node is delivered to the data quality module for data validation.

  • CHECKING_CONDITION: The node is checking branch conditions.

  • FAILURE: The node failed to execute.

  • SUCCESS: The node executed successfully.

Valid values:

  • WAIT_RESOURCE :

    waiting for resources.

  • SUCCESS :

    successful.

  • RUNNING :

    running.

  • WAIT_TIME :

    waiting for the scheduled time.

  • WAIT_TRIGGER :

    waiting to be triggered.

  • CHECKING :

    checking data quality.

  • FAILURE :

    failed.

  • NOT_RUN :

    not run.

NOT_RUN

OrderBy

string

No

The sorting rule for the returned results. Valid values:

  • CREATE_TIME_DESC: Sorts the results in descending order of creation time.

  • INSTANCE_ID_DESC: Sorts the results in descending order of instance ID. This is the default value.

Valid values:

  • CREATE_TIME_DESC :

    descending order of creation time.

  • INSTANCE_ID_DESC :

    descending order of instance ID.

INSTANCE_ID_DESC

Response elements

Element

Type

Description

Example

object

The response.

HttpStatusCode

integer

The HTTP status code.

200

RequestId

string

The ID of the request. You can use the 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: The request was successful.

  • false: The request failed.

true

Data

object

The list of instances.

PageNumber

integer

The page number.

1

PageSize

integer

The number of entries returned 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 (1): The node is not run.

  • WAIT_TIME (2): The node is waiting for the scheduled time.

  • WAIT_RESOURCE (3): The node is waiting for resources. The node is delivered to the execution engine and is waiting in the queue for scheduling.

  • RUNNING (4): The node is running.

  • CHECKING (7): The node is checking data quality. The node has finished running and is delivered to the data quality module for verification.

  • CHECKING_CONDITION (8): The node is checking branch conditions. The node has finished running and is verifying branch conditions.

  • WAIT_TRIGGER (9): The node is waiting to be triggered. A trigger node enters this state after the waiting period ends.

  • FAILURE (5): The node failed to run.

  • SUCCESS (6): The node ran successfully.

NOT_RUN

CycTime

integer

The time when the scheduled node runs. The value is a 13-digit timestamp, such as 1590422400000.

1590422400000

BeginRunningTime

integer

The time when the instance started running. The value is a 13-digit timestamp, such as 1590416703313.

1590416703313

FinishTime

integer

The time when the scheduled node finished running. The value is a 13-digit timestamp, such as 1590416703313.

1590416703313

ErrorMessage

string

[Deprecated] The error message of the instance. You can call the GetInstanceLog operation to obtain the error message of the executed node.

error message

CreateTime

integer

The time when the instance was created. The value is a 13-digit timestamp, such as 1590416703313.

1590416703313

DagId

integer

The ID of the workflow.

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 instance. Valid values:

  • NORMAL (0): The node is a normal scheduled node that is scheduled on a regular basis.

  • MANUAL (1): The node is a manual node that is not scheduled on a regular basis.

  • PAUSE (2): The node is a frozen node. The node is scheduled on a daily basis, but its status is directly set to failed when the scheduling is triggered.

  • SKIP (3): The node is a dry-run node. The node is scheduled on a daily basis, but its status is directly set to successful when the scheduling is triggered.

  • SKIP_UNCHOOSE (4): The node is an unselected node in a temporary workflow. This type of node exists only in temporary workflows, and its status is directly set to successful when the scheduling is triggered.

  • SKIP_CYCLE (5): The node is a weekly or monthly node that has not reached its scheduled run cycle. The node is scheduled on a daily basis, but its status is directly set to successful when the scheduling is triggered.

  • CONDITION_UNCHOOSE (6): The upstream instance contains a branch (IF) node, but this downstream node is not selected by the branch node. Its status is directly set to dry-run.

  • REALTIME_DEPRECATED (7): The node is a real-time generated periodic instance that has expired. Its status is directly set to successful.

NORMAL(0)

ParamValues

string

The parameter values.

bizdate=$bizdate tbods=$tbods

Connection

string

The connection string.

odps_source

BaselineId

integer

The baseline ID.

123123

DqcType

integer

The DQC type. Valid values:

  • 0: DQC is associated.

  • 1: DQC is not associated.

1

DagType

string

The type of the workflow. Valid values:

  • DAILY (0): The workflow is a daily scheduled workflow.

  • MANUAL (1): The workflow is a manual workflow.

  • SMOKE_TEST (2): The workflow is a smoke test workflow.

  • SUPPLY_DATA (3): The workflow is a data backfill workflow.

  • MANUAL_FLOW (4): The workflow is a manually run DataFlow or PAI workflow, such as running a workflow in the IDE.

  • BUSINESS_PROCESS_DAG (5): The workflow is a manual business process workflow.

DAILY

BusinessId

integer

The workflow ID.

123

TaskRerunTime

integer

The number of times the instance can be rerun. The value can be empty or an integer greater than or equal to 0.

  • If the value is empty, the auto-rerun feature is not configured for the node.

  • If the value is 0, the instance cannot be rerun.

  • If the value is an integer greater than 0 (assumed as n), the instance can be rerun n times. For example, if the value is 1, the remaining rerun count is 1. If the value is 2, the remaining rerun count is 2, and so on. The initial value is the number of auto-reruns defined for the node plus 1.

0

ModifyTime

integer

The last time the scheduled node was modified. The value is a 13-digit timestamp, such as 1590416703313.

1590416703313

Repeatability

boolean

Indicates whether the instance can be repeatedly run.

true

RepeatInterval

integer

The interval at which the scheduling is retried after the scheduled node fails. Unit: milliseconds.

60000

InstanceId

integer

The ID of the instance.

1234

BeginWaitResTime

integer

The time when the instance started waiting for resources. The value is a 13-digit timestamp, such as 1590416703313.

1590416703313

RelatedFlowId

integer

The ID of the associated workflow.

123456

Bizdate

integer

The business date of the scheduled node. Typically, this is the day before the node runs. The value is a 13-digit timestamp, such as 1590336000000.

1590336000000

NodeName

string

The name of the node.

kzh

BeginWaitTimeTime

integer

The time when the instance started waiting to be scheduled. The value is a 13-digit timestamp, such as 1590416703313.

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 ID of the node.

33115

CreateUser

string

The user who triggered the instance. For example, if the user Test triggers a data backfill instance, the value 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.