All Products
Search
Document Center

DataWorks:UpdateWorkflow

Last Updated:Mar 30, 2026

Updates a specified workflow in full update mode.

Operation description

DataWorks Basic Edition or higher 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 workflow ID.

1234

EnvType

string

No

The project environment.

  • Prod

  • Dev

Prod

Name

string

Yes

The name of the workflow.

My Workflow

Owner

string

Yes

The account ID of the owner.

1000

Trigger

object

Yes

The trigger method.

Type

string

Yes

The trigger type. Valid values:

  • Scheduler: periodically triggered

  • Manual

Scheduler

Cron

string

No

The Cron expression. This parameter takes effect only if the Type parameter is set to Scheduler.

00 00 00 * * ?

StartTime

string

No

The time when periodic triggering takes effect. This parameter takes effect only if the Type parameter is set to Scheduler. The value of this parameter is in theyyyy-mm-dd hh:mm:ss format.

1970-01-01 00:00:00

EndTime

string

No

The expiration time of periodic triggering. Takes effect only when type is set to Scheduler. The value of this parameter is in theyyyy-mm-dd hh:mm:ss format.

9999-01-01 00:00:00

Description

string

No

The description.

test

Dependencies

array<object>

No

The dependency information.

object

No

Type

string

Yes

The dependency type. Valid values:

  • CrossCycleDependsOnChildren: Depends on level-1 downstream nodes across cycles

  • CrossCycleDependsOnSelf: Depends on itself across cycles.

  • CrossCycleDependsOnOtherNode: Depends on other nodes across cycles.

  • Normal: Depends on nodes in the same cycle.

Normal

UpstreamOutput

string

No

The output identifier of the upstream task. (This parameter is returned only if Normal is set and the node input is configured.)

pre.odps_sql_demo_0

UpstreamTaskId

integer

No

The ID of the upstream task. (This parameter is returned only if Normal or CrossCycleDependsOnOtherNode is set and the node input is not configured.)

1234

Parameters

string

No

The parameters.

para1=$bizdate para2=$[yyyymmdd]

Tasks

array<object>

No

Details about tasks.

array<object>

No

Id

integer

No

The ID of the task. Specifying this field triggers a full update for the corresponding task. If left unspecified, a new task will be created.

1234

Name

string

Yes

The name of the task.

SQL node

Description

string

No

The description of the task.

Test

Type

string

Yes

The type of the task.

ODPS_SQL

Owner

string

Yes

The account ID of the owner.

1000

BaseLineId

integer

No

The baseline ID.

1234

Timeout

integer

No

The task execution timeout in seconds.

3600

RerunMode

string

Yes

Configuration for whether the task can be rerun.

  • AllDenied: The task cannot be rerun.

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

  • AllAllowed: The task can always be rerun.

AllAllowed

RerunTimes

integer

No

The number of retry attempts. Takes effect when the task is configured to allow reruns.

3

RerunInterval

integer

No

The retry interval in seconds.

60

Script

object

No

The run script information.

Content

string

No

The script content.

echo "helloWorld"

Parameters

string

No

The script parameter list.

para1=$bizdate

Trigger

object

Yes

The trigger method.

Type

string

No

The trigger type. Valid values:

  • Scheduler: periodically triggered

  • Manual

Scheduler

Recurrence

string

Yes

The running mode of the task after it is triggered. This parameter takes effect only if the Type parameter is set to Scheduler. Valid values:

  • Pause

  • Skip

  • Normal

Normal

RuntimeResource

object

Yes

Runtime environment configurations, such as resource group information.

ResourceGroupId

string

Yes

The identifier of the scheduling resource group used in the task runtime configuration.

S_res_group_524258031846018_1684XXXXXXXXX

Image

string

No

The image ID used in the task runtime configuration.

i-xxxxxx

Cu

string

No

The default number of compute units (CUs) configured for task running.

0.25

DataSource

object

No

The information about the associated data source.

Name

string

No

The data source name.

odps_test

Inputs

object

No

The input information. By default, all input information is deleted if this parameter is set to null.

Variables

array<object>

No

The variables. By default, the settings of all input variables are deleted if this parameter is set to null or not specified.

object

No

Name

string

No

The name of the variable.

key1

Type

string

Yes

The type. Valid values:

  • Constant: constant value.

  • PassThrough: node output.

  • System: variable.

  • NodeOutput: script output.

Constant

Value

string

No

The value of the variable.

value1

Outputs

object

No

The output information. By default, all output information is deleted if this parameter is set to null.

TaskOutputs

array<object>

No

The task outputs. By default, all task output information is deleted if this parameter is set to null or not specified.

object

No

Output

string

No

The identifier of the output.

pre.odps_sql_demo_0

Variables

array<object>

No

The variables. Note: The settings of all output variables are deleted if this parameter is set to null or not specified.

object

No

Name

string

No

The name of the variable.

key1

Type

string

Yes

The type. Valid values:

  • Constant: constant value.

  • PassThrough: node output.

  • System: variable.

  • NodeOutput: script output.

Constant

Value

string

No

The value of the variable.

value1

Dependencies

array<object>

No

The dependency information. Note: If this parameter is left empty or set to an empty array, all dependency configurations will be deleted.

object

No

Type

string

Yes

The dependency type. Valid values:

  • CrossCycleDependsOnChildren: Depends on level-1 downstream nodes across cycles

  • CrossCycleDependsOnSelf: Depends on itself across cycles.

  • CrossCycleDependsOnOtherNode: Depends on other nodes across cycles.

  • Normal: Depends on nodes in the same cycle.

Normal

UpstreamOutput

string

No

The output identifier of the upstream task. (This parameter is returned only if Normal is set and the node input is configured.)

pre.odps_sql_demo_0

UpstreamTaskId

integer

No

The ID of the upstream task. (This parameter is returned only if Normal or CrossCycleDependsOnOtherNode is set and the node input is not configured.)

1234

Tags

array<object>

No

The list of task tags. Note: If this field is unspecified or set to an empty array, all existing Tag configurations will be deleted by default.

object

No

Key

string

Yes

The key of a tag.

key1

Value

string

No

The value of a tag.

value1

ClientUniqueCode

string

No

The client-side unique token for the task, used to ensure asynchronous processing and idempotency. If not specified during creation, the system will automatically generate one. This token is uniquely associated with the resource ID. If provided when updating or deleting resources, this parameter must match the client token used during creation.

Task_0bc5213917368545132902xxxxxxxx

EnvType

string

No

The project environment.

  • Prod

  • Dev

Prod

Outputs

object

No

The output information.

TaskOutputs

array<object>

No

The task outputs.

object

No

Output

string

No

The identifier of the output.

pre.odps_sql_demo_0

Tags

array<object>

No

The tags.

object

No

Key

string

Yes

The tag key.

key1

Value

string

No

The tag value.

value1

ClientUniqueCode

string

No

The unique code of the client. This parameter is used to create a workflow asynchronously and implement the idempotence of the workflow. If you do not specify this parameter when you create the workflow, the system automatically generates a unique code. The unique code is uniquely associated with the workflow ID. If you specify this parameter when you update or delete the workflow, the value of this parameter must be the unique code that is used to create the workflow.

Workflow_0bc5213917368545132902xxxxxxxx

InstanceMode

string

No

The instance generation mode.

  • T+1: the next day

  • Immediately Note: Periodic instances will only be generated normally if the workflow's scheduled time is more than 10 minutes after the workflow publication time. Real-time instance generation is not available during the batch instance generation period (23:30 to 24:00). While workflows can be published during this time, instances will not be regenerated immediately after submission.

T+1

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

22C97E95-F023-56B5-8852-B1A77A17XXXX

Success

boolean

Indicates whether the request was successful.

true

Examples

Success response

JSON format

{
  "RequestId": "22C97E95-F023-56B5-8852-B1A77A17XXXX",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.