ListDownstreamTaskInstances

Updated at:

Retrieves a paginated list of downstream task instances for a specified task instance.

Operation description

You must purchase DataWorks Basic Edition or higher to use this feature.

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:*

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Id

integer

Yes

The ID of the task instance. You can obtain the ID from the PagingInfo.TaskInstances[].Id field returned by the ListTaskInstances operation.

1234

PageSize

integer

No

The number of entries per page. Default value: 10.

10

PageNumber

integer

No

The page number, starting from 1. Default value: 1.

1

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID. You can use this ID to locate logs and troubleshoot issues.

22C97E95-F023-56B5-8852-B1A77A17XXXX

PagingInfo

object

The pagination information.

TaskInstances deprecated

array<object>

[Deprecated] The list of task instances. Use DownstreamTaskInstances instead.

array<object>

StepType

string

The dependency type. Valid values:

  • Normal: Same-cycle dependency.

  • CrossCycle: Cross-cycle dependency.

Normal

TaskId

integer

The ID of the corresponding task.

1234

TaskType

string

The type of the corresponding task.

ODPS_SQL

TaskName

string

The name of the corresponding task.

SQL node

Description

string

The description.

test

WorkflowId

integer

The ID of the workflow to which the task belongs.

1234

WorkflowName

string

The name of the workflow to which the task belongs.

Test workflow

TriggerType

string

The trigger type.

Valid values:

  • Scheduler :

    Triggered by a scheduling cycle.

  • Manual :

    Triggered manually.

Scheduler

TriggerRecurrence

string

The run mode when triggered. This parameter takes effect only when TriggerType is set to Scheduler.

Valid values:

  • Pause :

    Paused.

  • Skip :

    Dry run.

  • Normal :

    Normal run.

Normal

WorkflowInstanceId

integer

The ID of the workflow instance to which the task belongs.

1234

WorkflowInstanceType

string

The type of the workflow instance to which the task belongs.

Valid values:

  • SmokeTest :

    Smoke test.

  • Manual :

    Manual.

  • SupplementData :

    Data backfill.

  • ManualWorkflow :

    Manual workflow.

  • ManualFlow :

    Manually executed business flow.

  • Normal :

    Periodic scheduling.

Normal

Timeout

integer

The timeout period for task execution, in seconds.

Note: The scheduling system rounds the configured value to a whole number of hours.

3600

RerunMode

string

The configuration that specifies whether the task can be rerun.

Valid values:

  • AllDenied :

    Rerun is not allowed regardless of success or failure.

  • FailureAllowed :

    Rerun is allowed only upon failure.

  • AllAllowed :

    Rerun is allowed regardless of success or failure.

AllAllowed

RunNumber

integer

The current run count. Default value: 1.

1

PeriodNumber

integer

The cycle sequence number. This indicates the cycle round of the task instance on the current day.

1

BaselineId

integer

The baseline ID.

1234

Priority

integer

The execution priority of the task. Valid values: 1 to 8. A larger value indicates a higher priority. Default value: 1.

1

RuntimeResource

object

The resource group associated with the instance.

ResourceGroupId

string

The identifier of the scheduling resource group configured for task execution.

S_res_group_524258031846018_1684XXXXXXXXX

Image

string

The ID of the image configured for task execution.

i-xxxxxx

Cu

string

The number of compute units (CUs) consumed by the task execution configuration.

0.25

Runtime

object

The runtime information of the instance.

ProcessId

string

The unique ID of the run.

T3_123

Gateway

string

The machine on which the task is executed.

cn-shanghai.1.2

DataSource

object

The data source associated with the instance.

Name

string

The name of the data source.

mysql_test

Status

string

The run status of the instance. Valid values:

  • NotRun: Not run.

  • Running: Running.

  • WaitTime: Waiting for the trigger time.

  • CheckingCondition: Checking branch conditions.

  • WaitResource: Waiting for resources.

  • Failure: Failed.

  • Success: Succeeded.

  • Checking: Submitted for data quality check.

  • WaitTrigger: Waiting for an external trigger. Trigger-based nodes enter this state after the waiting period.

Success

TriggerTime

integer

The scheduled trigger time.

The value is a 13-digit number, such as 1710239005403.

1710239005403

Bizdate

integer

The business date.

The value is a 13-digit number, such as 1710239005403.

1710239005403

StartedTime

integer

The start time.

The value is a 13-digit number, such as 1710239005403.

1710239005403

FinishedTime

integer

The completion time.

The value is a 13-digit number, such as 1710239005403.

1710239005403

Id

integer

The unique identifier of the task instance.

1234

ProjectId

integer

The ID of the DataWorks workspace.

100

ProjectEnv deprecated

string

[Deprecated] The project environment. Use EnvType instead.

Prod

EnvType

string

The environment to which the destination data source belongs. Valid values:

  • Dev: Development environment.

  • Prod: Production environment.

Prod

Owner

string

The account ID of the task owner.

100

CreateTime

integer

The creation time.

The value is a 13-digit number, such as 1710239005403.

1710239005403

ModifyTime

integer

The update time.

The value is a 13-digit number, such as 1710239005403.

1710239005403

CreateUser

string

The account ID of the user who created the instance.

1000

ModifyUser

string

The account ID of the user who updated the instance.

1000

DownstreamTaskInstances

array<object>

The list of downstream task instances and their dependency types.

array<object>

DependencyType

string

The dependency type. Valid values:

  • Normal: Same-cycle dependency.

  • CrossCycle: Cross-cycle dependency.

Normal

TaskInstance

object

The task instance.

TaskId

integer

The ID of the corresponding task.

1234

TaskType

string

The type of the corresponding task.

ODPS_SQL

TaskName

string

The name of the corresponding task.

SQL node

Description

string

The description.

test

WorkflowId

integer

The ID of the workflow to which the task belongs.

1234

WorkflowName

string

The name of the workflow to which the task belongs.

Test workflow

TriggerType

string

The trigger type. Valid values:

  • Scheduler: Triggered by a scheduling cycle.

  • Manual: Triggered manually.

Scheduler

TriggerRecurrence

string

The run mode when triggered. This parameter takes effect only when TriggerType is set to Scheduler. Valid values:

  • Pause: Paused.

  • Skip: Dry run.

  • Normal: Normal run.

Normal

WorkflowInstanceId

integer

The ID of the workflow instance to which the task belongs.

1234

WorkflowInstanceType

string

The type of the workflow instance to which the task belongs. Valid values:

  • Normal: Periodic scheduling.

  • Manual: Manual task.

  • SmokeTest: Smoke test.

  • SupplementData: Data backfill.

  • ManualWorkflow: Manual workflow.

Normal

Timeout

integer

The timeout period for task execution, in seconds.

Note: The scheduling system rounds the configured value to a whole number of hours.

3600

RerunMode

string

The configuration that specifies whether the task can be rerun.

AllAllowed

RunNumber

integer

The current run count. Default value: 1.

1

PeriodNumber

integer

The cycle sequence number. This indicates the cycle round of the task instance on the current day.

1

BaselineId

integer

The baseline ID.

1234

Priority

integer

The execution priority of the task. Valid values: 1 to 8. A larger value indicates a higher priority. Default value: 1.

1

RuntimeResource

object

The runtime environment configuration, such as resource group information.

ResourceGroupId

string

The identifier of the scheduling resource group configured for task execution.

S_res_group_524258031846018_1684XXXXXXXXX

Image

string

The ID of the image configured for task execution.

i-xxxxxx

Cu

string

The number of compute units (CUs) consumed by the task execution configuration.

0.25

Runtime

object

The runtime information of the instance.

ProcessId

string

The unique ID of the run.

T3_123

Gateway

string

The machine on which the task is executed.

cn-shanghai.1.2

DataSource

object

The data source associated with the instance.

Name

string

The name of the data source.

mysql_test

Status

string

The run status of the instance. Valid values:

  • NotRun: Not run.

  • Running: Running.

  • WaitTime: Waiting for the trigger time.

  • CheckingCondition: Checking branch conditions.

  • WaitResource: Waiting for resources.

  • Failure: Failed.

  • Success: Succeeded.

  • Checking: Submitted for data quality check.

  • WaitTrigger: Waiting for an external trigger. Trigger-based nodes enter this state after the waiting period.

Success

TriggerTime

integer

The scheduled trigger time.

The value is a 13-digit number, such as 1710239005403.

1710239005403

Bizdate

integer

The business date.

The value is a 13-digit number, such as 1710239005403.

1710239005403

StartedTime

integer

The start time.

The value is a 13-digit number, such as 1710239005403.

1710239005403

FinishedTime

integer

The completion time.

The value is a 13-digit number, such as 1710239005403.

1710239005403

Id

integer

The unique identifier of the task instance.

1234

ProjectId

integer

The ID of the DataWorks workspace.

100

EnvType

string

The environment to which the destination data source belongs. Valid values:

  • Dev: Development environment.

  • Prod: Production environment.

Prod

Owner

string

The account ID of the task owner.

1000

CreateTime

integer

The creation time.

The value is a 13-digit number, such as 1710239005403.

1710239005403

ModifyTime

integer

The update time.

The value is a 13-digit number, such as 1710239005403.

1710239005403

CreateUser

string

The account ID of the user who created the instance.

1000

ModifyUser

string

The account ID of the user who updated the instance.

1000

TotalCount

integer

The total number of downstream task instances for the specified task instance.

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": [
      {
        "StepType": "Normal",
        "TaskId": 1234,
        "TaskType": "ODPS_SQL",
        "TaskName": "SQL node\n",
        "Description": "test",
        "WorkflowId": 1234,
        "WorkflowName": "Test workflow",
        "TriggerType": "Scheduler",
        "TriggerRecurrence": "Normal",
        "WorkflowInstanceId": 1234,
        "WorkflowInstanceType": "Normal",
        "Timeout": 3600,
        "RerunMode": "AllAllowed",
        "RunNumber": 1,
        "PeriodNumber": 1,
        "BaselineId": 1234,
        "Priority": 1,
        "RuntimeResource": {
          "ResourceGroupId": "S_res_group_524258031846018_1684XXXXXXXXX",
          "Image": "i-xxxxxx",
          "Cu": "0.25"
        },
        "Runtime": {
          "ProcessId": "T3_123\n",
          "Gateway": "cn-shanghai.1.2"
        },
        "DataSource": {
          "Name": "mysql_test\n"
        },
        "Status": "Success",
        "TriggerTime": 1710239005403,
        "Bizdate": 1710239005403,
        "StartedTime": 1710239005403,
        "FinishedTime": 1710239005403,
        "Id": 1234,
        "ProjectId": 100,
        "ProjectEnv": "Prod",
        "EnvType": "Prod",
        "Owner": "100",
        "CreateTime": 1710239005403,
        "ModifyTime": 1710239005403,
        "CreateUser": "1000\n",
        "ModifyUser": "1000\n"
      }
    ],
    "DownstreamTaskInstances": [
      {
        "DependencyType": "Normal",
        "TaskInstance": {
          "TaskId": 1234,
          "TaskType": "ODPS_SQL",
          "TaskName": "SQL node",
          "Description": "test",
          "WorkflowId": 1234,
          "WorkflowName": "Test workflow",
          "TriggerType": "Scheduler",
          "TriggerRecurrence": "Normal",
          "WorkflowInstanceId": 1234,
          "WorkflowInstanceType": "Normal",
          "Timeout": 3600,
          "RerunMode": "AllAllowed",
          "RunNumber": 1,
          "PeriodNumber": 1,
          "BaselineId": 1234,
          "Priority": 1,
          "RuntimeResource": {
            "ResourceGroupId": "S_res_group_524258031846018_1684XXXXXXXXX",
            "Image": "i-xxxxxx",
            "Cu": "0.25"
          },
          "Runtime": {
            "ProcessId": "T3_123",
            "Gateway": "cn-shanghai.1.2"
          },
          "DataSource": {
            "Name": "mysql_test"
          },
          "Status": "Success",
          "TriggerTime": 1710239005403,
          "Bizdate": 1710239005403,
          "StartedTime": 1710239005403,
          "FinishedTime": 1710239005403,
          "Id": 1234,
          "ProjectId": 100,
          "EnvType": "Prod",
          "Owner": "1000",
          "CreateTime": 1710239005403,
          "ModifyTime": 1710239005403,
          "CreateUser": "1000",
          "ModifyUser": "1000"
        }
      }
    ],
    "TotalCount": 100,
    "PageSize": 10,
    "PageNumber": 1
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.