All Products
Search
Document Center

:UpdateWorkflow

Last Updated:Jul 07, 2026

Updates a specified workflow by using the full update method. Fields that can be synchronously updated to DataStudio include: owner, data source, schedule resource group, description, and trigger run mode (Normal, Skip, or Pause).

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 workflow ID.

1234

EnvType

string

No

The project environment. Valid values:

  • Prod: production

  • Dev: development

Prod

Name

string

Yes

The name.

My Workflow

Owner

string

Yes

The account ID of the owner.

1000

Trigger

object

Yes

The trigger configuration.

Type

string

Yes

The trigger type. Valid values:

  • Scheduler: triggered by a scheduling cycle

  • Manual: manually triggered

Scheduler

Cron

string

No

The cron expression. This parameter takes effect only when type is set to Scheduler.

00 00 00 * * ?

StartTime

string

No

The effective period of the epoch trigger. This parameter takes effect only when type is set to Scheduler. Format: yyyy-mm-dd hh:mm:ss.

1970-01-01 00:00:00

EndTime

string

No

The time when the periodic trigger expires. This parameter takes effect only when type is set to Scheduler. Format: yyyy-mm-dd hh:mm:ss.

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: cross-cycle dependency on first-level child nodes

  • CrossCycleDependsOnSelf: cross-cycle dependency on the current node

  • CrossCycleDependsOnOtherNode: cross-cycle dependency on other nodes

  • Normal: same-cycle dependency

Normal

UpstreamOutput

string

No

The output identifier of the upstream node. This field is returned when the dependency type is same-cycle dependency and input content is specified.

pre.odps_sql_demo_0

UpstreamTaskId

integer

No

The ID of the upstream node. This field is returned when the dependency type is cross-cycle dependency on other nodes or same-cycle dependency without input content specified. It is not returned in other cases.

1234

Parameters

string

No

The parameter list.

para1=$bizdate para2=$[yyyymmdd]

Tasks

array<object>

No

The node list.

array<object>

No

Id

integer

No

The node ID. If this field is specified, the corresponding node is fully updated. If this field is not specified, a new node is created.

1234

Name

string

Yes

The name of the node.

SQL node

Description

string

No

The description.

Test

Type

string

Yes

The node type.

ODPS_SQL

Owner

string

Yes

The account ID of the owner.

1000

BaseLineId

integer

No

The baseline ID.

1234

Timeout

integer

No

The timeout period for node execution, in seconds.

3600

RerunMode

string

Yes

Specifies whether the node can be rerun. Valid values:

  • AllDenied: cannot be rerun regardless of success or failure

  • FailureAllowed: can be rerun only upon failure

  • AllAllowed: can be rerun regardless of success or failure

AllAllowed

RerunTimes

integer

No

The number of retries. This parameter takes effect only when the node is configured to allow reruns.

3

RerunInterval

integer

No

The retry time interval, in seconds.

60

Script

object

No

The script information.

Content

string

No

The script content.

echo "helloWorld"

Parameters

string

No

The list of script parameters.

para1=$bizdate

Trigger

object

Yes

The trigger configuration of the node.

Type

string

No

The trigger type. Valid values:

  • Scheduler: triggered by a scheduling cycle

  • Manual: manually triggered

Scheduler

Recurrence

string

Yes

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

  • Pause: paused

  • Skip: dry run

  • Normal: normal execution

Normal

RuntimeResource

object

Yes

The runtime environment configuration, such as resource group information.

ResourceGroupId

string

Yes

The identifier of the schedule resource group configured for the node.

S_res_group_524258031846018_1684XXXXXXXXX

Image

string

No

The image ID configured for the node.

i-xxxxxx

Cu

string

No

The CU consumption configured for the node.

0.25

DataSource

object

No

The associated data source information.

Name

string

No

The data source name.

odps_test

Inputs

object

No

The input information. If this field is empty, all Inputs configurations are deleted by default.

Variables

array<object>

No

The list of variable definitions. If this field is not specified or is an empty array, all Inputs.Variables configurations are deleted by default.

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. If this field is empty, all Outputs configurations are deleted by default.

TaskOutputs

array<object>

No

The list of node output definitions. If this field is not specified or is an empty array, all TaskOutputs configurations are deleted by default.

object

No

Output

string

No

The identifier of the output.

pre.odps_sql_demo_0

Variables

array<object>

No

The list of variable definitions. If this field is not specified or is an empty array, all Outputs.Variables configurations are deleted by default.

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. If this field is not specified or is an empty array, all Dependencies configurations are deleted by default.

object

No

Type

string

Yes

The dependency type. Valid values:

  • CrossCycleDependsOnChildren: cross-cycle dependency on first-level child nodes

  • CrossCycleDependsOnSelf: cross-cycle dependency on the current node

  • CrossCycleDependsOnOtherNode: cross-cycle dependency on other nodes

  • Normal: same-cycle dependency

Normal

UpstreamOutput

string

No

The output identifier of the upstream node. This field is returned when the dependency type is same-cycle dependency and input content is specified.

pre.odps_sql_demo_0

UpstreamTaskId

integer

No

The ID of the upstream node. This field is returned when the dependency type is cross-cycle dependency on other nodes or same-cycle dependency without input content specified. It is not returned in other cases.

1234

Tags

array<object>

No

The list of node tags. If this field is not specified or is an empty array, all Tags configurations are deleted by default.

object

No

Key

string

Yes

The tag key.

key1

Value

string

No

The tag value.

value1

ClientUniqueCode

string

No

The client unique code of the node, used for asynchronous operations and idempotence. If not specified during creation, the system automatically generates one, and the code is uniquely bound to the resource ID. If this parameter is specified during update or deletion, it must be consistent with the client unique code used during creation.

Task_0bc5213917368545132902xxxxxxxx

EnvType

string

No

The project environment. Valid values:

  • Prod: production

  • Dev: development

Prod

Outputs

object

No

The output information.

TaskOutputs

array<object>

No

The list of workflow node output definitions.

object

No

Output

string

No

The output identifier.

pre.odps_sql_demo_0

Tags

array<object>

No

The list of workflow tags.

object

No

Key

string

Yes

The tag key.

key1

Value

string

No

The tag value.

value1

ClientUniqueCode

string

No

The client unique code of the workflow, used for asynchronous operations and idempotence. If not specified during creation, the system automatically generates one, and the code is uniquely bound to the resource ID. If this parameter is specified during update or deletion, it must be consistent with the client unique code used during creation.

Workflow_0bc5213917368545132902xxxxxxxx

InstanceMode

string

No

The instance generation mode. Valid values:

  • T+1: Instances are generated the next day.

  • Immediately: Instances are generated immediately. Periodic instances are generated only if the scheduled time of the workflow is at least 10 minutes after the workflow is published. During the full instance generation period (22:00 to 24:00), real-time instance generation is not available. You can submit and publish workflows during this period, but instances are not regenerated after submission.

T+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

Success

boolean

Indicates whether the operation 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.