All Products
Search
Document Center

DataWorks:UpdateWorkflow

Last Updated:Jan 12, 2026

Updates a specified workflow in full update mode.

Operation description

This API operation is available for all DataWorks editions.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
IdlongYes

The workflow ID.

1234
EnvTypestringNo

The project environment.

  • Prod
  • Dev
Prod
NamestringYes

The name of the workflow.

My Workflow
OwnerstringYes

The account ID of the owner.

1000
TriggerobjectYes

The trigger method.

TypestringYes

The trigger type. Valid values:

  • Scheduler: periodically triggered
  • Manual
Scheduler
CronstringNo

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

00 00 00 * * ?
StartTimestringNo

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
EndTimestringNo

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
DescriptionstringNo

The description.

test
Dependenciesarray<object>No

The dependency information.

DependenciesobjectNo
TypestringYes

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
UpstreamOutputstringNo

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
UpstreamTaskIdlongNo

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
ParametersstringNo

The parameters.

para1=$bizdate para2=$[yyyymmdd]
Tasksarray<object>No

Details about tasks.

TaskobjectNo
IdlongNo

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
NamestringYes

The name of the task.

SQL node
DescriptionstringNo

The description of the task.

Test
TypestringYes

The type of the task.

ODPS_SQL
OwnerstringYes

The account ID of the owner.

1000
BaseLineIdlongNo

The baseline ID.

1234
TimeoutintegerNo

The task execution timeout in seconds.

3600
RerunModestringYes

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
RerunTimesintegerNo

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

3
RerunIntervalintegerNo

The retry interval in seconds.

60
ScriptobjectNo

The run script information.

ContentstringNo

The script content.

echo "helloWorld"
ParametersstringNo

The script parameter list.

para1=$bizdate
TriggerobjectYes

The trigger method.

TypestringNo

The trigger type. Valid values:

  • Scheduler: periodically triggered
  • Manual
Scheduler
RecurrencestringYes

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
RuntimeResourceobjectYes

Runtime environment configurations, such as resource group information.

ResourceGroupIdstringYes

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

S_res_group_524258031846018_1684XXXXXXXXX
ImagestringNo

The image ID used in the task runtime configuration.

i-xxxxxx
CustringNo

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

0.25
DataSourceobjectNo

The information about the associated data source.

NamestringNo

The data source name.

odps_test
InputsobjectNo

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

Variablesarray<object>No

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

VariableobjectNo
NamestringNo

The name of the variable.

key1
TypestringYes

The type. Valid values:

  • Constant: constant value.
  • PassThrough: node output.
  • System: variable.
  • NodeOutput: script output.
Constant
ValuestringNo

The value of the variable.

value1
OutputsobjectNo

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

TaskOutputsarray<object>No

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

TaskOutputobjectNo
OutputstringNo

The identifier of the output.

pre.odps_sql_demo_0
Variablesarray<object>No

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

VariableobjectNo
NamestringNo

The name of the variable.

key1
TypestringYes

The type. Valid values:

  • Constant: constant value.
  • PassThrough: node output.
  • System: variable.
  • NodeOutput: script output.
Constant
ValuestringNo

The value of the variable.

value1
Dependenciesarray<object>No

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

DependencyobjectNo
TypestringYes

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
UpstreamOutputstringNo

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
UpstreamTaskIdlongNo

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
Tagsarray<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.

TagobjectNo
KeystringYes

The key of a tag.

key1
ValuestringNo

The value of a tag.

value1
ClientUniqueCodestringNo

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
EnvTypestringNo

The project environment.

  • Prod
  • Dev
Prod
OutputsobjectNo

The output information.

TaskOutputsarray<object>No

The task outputs.

TaskOutputobjectNo
OutputstringNo

The identifier of the output.

pre.odps_sql_demo_0
Tagsarray<object>No

The tags.

TagobjectNo
KeystringYes

The tag key.

key1
ValuestringNo

The tag value.

value1
ClientUniqueCodestringNo

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
InstanceModestringNo

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 parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

22C97E95-F023-56B5-8852-B1A77A17XXXX
Successboolean

Indicates whether the request was successful.

true

Examples

Sample success responses

JSONformat

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

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-05-15The request parameters of the API has changedView Change Details
2025-03-31The internal configuration of the API is changed, but the call is not affectedView Change Details