Updates a specified workflow in full update mode.
Operation description
This API operation is available for all DataWorks editions.
Debugging
Authorization information
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| Id | long | Yes | The workflow ID. | 1234 |
| EnvType | string | No | The project environment.
| 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 |
| 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 the | 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 the | 9999-01-01 00:00:00 |
| Description | string | No | The description. | test |
| Dependencies | array<object> | No | The dependency information. | |
| Dependencies | object | No | ||
| Type | string | Yes | The dependency type. Valid values:
| Normal |
| UpstreamOutput | string | No | The output identifier of the upstream task. (This parameter is returned only if | pre.odps_sql_demo_0 |
| UpstreamTaskId | long | No | The ID of the upstream task. (This parameter is returned only if | 1234 |
| Parameters | string | No | The parameters. | para1=$bizdate para2=$[yyyymmdd] |
| Tasks | array<object> | No | Details about tasks. | |
| Task | object | No | ||
| Id | long | 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 | long | 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.
| 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 |
| 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:
| 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. | |
| Variable | object | No | ||
| Name | string | No | The name of the variable. | key1 |
| Type | string | Yes | The type. Valid values:
| 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. | |
| TaskOutput | 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. | |
| Variable | object | No | ||
| Name | string | No | The name of the variable. | key1 |
| Type | string | Yes | The type. Valid values:
| 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. | |
| Dependency | object | No | ||
| Type | string | Yes | The dependency type. Valid values:
| Normal |
| UpstreamOutput | string | No | The output identifier of the upstream task. (This parameter is returned only if | pre.odps_sql_demo_0 |
| UpstreamTaskId | long | No | The ID of the upstream task. (This parameter is returned only if | 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. | |
| Tag | 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 |
| Outputs | object | No | The output information. | |
| TaskOutputs | array<object> | No | The task outputs. | |
| TaskOutput | object | No | ||
| Output | string | No | The identifier of the output. | pre.odps_sql_demo_0 |
| Tags | array<object> | No | The tags. | |
| Tag | 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 |
Response parameters
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 time | Summary of changes | Operation |
|---|---|---|
| 2025-05-15 | The request parameters of the API has changed | View Change Details |
| 2025-03-31 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
