ListUpstreamTaskInstances

Updated at:

Retrieves the upstream instances of a specified instance by page.

Operation description

DataWorks Basic Edition or a more advanced edition is required.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

Id

integer

Yes

The instance ID.

1234

PageSize

integer

No

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

10

PageNumber

integer

No

The page number. Pages start from 1. Default value: 1.

1

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID, which is used to locate logs and troubleshoot issues.

22C97E95-F023-56B5-8852-B1A77A17XXXX

PagingInfo

object

The pagination information.

TaskInstances

array<object>

[Deprecated] The list of task instances. This field is deprecated. Use UpstreamTaskInstances 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 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: triggered by a scheduling cycle.

  • Manual: triggered manually.

Scheduler

TriggerRecurrence

string

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

Valid values:

  • Pause: paused

  • Skip: dry run

  • Normal: normal execution

Normal

WorkflowInstanceId

integer

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

1234

WorkflowInstanceType

string

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

Valid values:

  • SmokeTest: test.

  • SupplementData: data backfill.

  • Manual: manual.

  • ManualWorkflow: manual workflow.

  • Normal: scheduled run.

  • ManualFlow: manually executed business workflow.

Normal

Timeout

integer

The timeout period for task execution, in seconds.

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

3600

RerunMode

string

The rerun configuration of the node. Valid values:

  • AllDenied: The node cannot be rerun regardless of whether it fails or succeeds.

  • FailureAllowed: The node can be rerun only after it fails.

  • AllAllowed: The node can be rerun regardless of whether it fails or succeeds.

AllAllowed

RunNumber

integer

The current run number, starting from 1 by default.

1

PeriodNumber

integer

The period number. Indicates which scheduling cycle of the day the task instance belongs to.

1

BaselineId

integer

The baseline ID.

1234

Priority

integer

The task running priority. Minimum value: 1. Maximum value: 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 schedule resource group configured for the task.

S_res_group_524258031846018_1684XXXXXXXXX

Image

string

The image ID configured for the task.

i-xxxxxx

Cu

string

The compute unit (CU) consumption configured for the task.

0.25

Runtime

object

The instance runtime information.

ProcessId

string

The unique run ID.

T3_123

Gateway

string

The machine on which the task runs.

cn-shanghai.1.2

DataSource

object

The data source information associated with the instance.

Name

string

The data source name.

mysql_test

Status

string

The instance running status.

Valid values:

  • NotRun: not run.

  • Running: running.

  • WaitTime: waiting for TriggerTime.

  • CheckingCondition: checking branch conditions.

  • WaitResource: waiting for resources.

  • Failure: execution failed.

  • Success: execution succeeded.

  • Checking: submitted for data quality checking.

Success

TriggerTime

integer

The scheduled trigger time.

The value is a 13-digit number, for example, 1710239005403.

1710239005403

Bizdate

integer

The business date.

The value is a 13-digit number, for example, 1710239005403.

1710239005403

StartedTime

integer

The time when the instance started running.

The value is a 13-digit number, for example, 1710239005403.

1710239005403

FinishedTime

integer

The time when the instance finished running.

The value is a 13-digit number, for example, 1710239005403.

1710239005403

Id

integer

The unique identifier of the task instance.

1234

ProjectId

integer

The project ID.

100

ProjectEnv deprecated

string

The project environment.

  • Prod: production.

  • Dev: development.

Prod

EnvType

string

The project environment.

  • Prod: production.

  • Dev: development.

Prod

Owner

string

The account ID of the task owner.

1000

CreateTime

integer

The creation time.

The value is a 13-digit number, for example, 1710239005403.

1710239005403

ModifyTime

integer

The modification time.

The value is a 13-digit number, for example, 1710239005403.

1710239005403

CreateUser

string

The account ID of the user who created the instance.

1000

ModifyUser

string

The account ID of the user who last modified the instance.

1000

UpstreamTaskInstances

array<object>

The list of upstream task instances.

array<object>

DependencyType

string

The dependency type.

Valid values:

  • Normal: same-cycle dependency.

  • CrossCycle: cross-cycle dependency.

Normal

TaskInstance

object

The details of 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 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: triggered by a scheduling cycle.

  • Manual: triggered manually.

Scheduler

TriggerRecurrence

string

The run mode when the instance is triggered. This parameter takes effect 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 instance belongs.

1234

WorkflowInstanceType

string

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

Valid values:

  • Normal: scheduled run.

  • Manual: manual task.

  • SmokeTest: 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 whole hours.

3600

RerunMode

string

The configuration that specifies whether the task can be rerun.

AllAllowed

RunNumber

integer

The current run number, starting from 1 by default.

1

PeriodNumber

integer

The period number. Indicates which scheduling cycle of the day the task instance belongs to.

1

BaselineId

integer

The baseline ID.

1234

Priority

integer

The task running priority. Minimum value: 1. Maximum value: 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 schedule resource group configured for the task.

S_res_group_524258031846018_1684XXXXXXXXX

Image

string

The image ID configured for the task.

i-xxxxxx

Cu

string

The compute unit (CU) consumption configured for the task.

0.25

Runtime

object

The instance runtime information.

ProcessId

string

The unique run ID.

T3_123

Gateway

string

The machine on which the task runs.

cn-shanghai.1.2

DataSource

object

The data source information associated with the instance.

Name

string

The data source name.

mysql_test

Status

string

The instance running status.

Valid values:

  • NotRun: not run.

  • Running: running.

  • WaitTime: waiting for TriggerTime.

  • CheckingCondition: checking branch conditions.

  • WaitResource: waiting for resources.

  • Failure: execution failed.

  • Success: execution succeeded.

  • Checking: submitted for data quality checking.

  • 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, for example, 1710239005403.

1710239005403

Bizdate

integer

The business date.

The value is a 13-digit number, for example, 1710239005403.

1710239005403

StartedTime

integer

The time when the instance started running.

The value is a 13-digit number, for example, 1710239005403.

1710239005403

FinishedTime

integer

The time when the instance finished running.

The value is a 13-digit number, for example, 1710239005403.

1710239005403

Id

integer

The unique identifier of the task instance.

1234

ProjectId

integer

The project ID.

100

EnvType

string

The environment of the target data source. 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, for example, 1710239005403.

1710239005403

ModifyTime

integer

The modification time.

The value is a 13-digit number, for example, 1710239005403.

1710239005403

CreateUser

string

The account ID of the user who created the instance.

1000

ModifyUser

string

The account ID of the user who last modified the instance.

1000

TotalCount

integer

The total number of records.

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