All Products
Search
Document Center

DataWorks:BatchUpdateTasks

Last Updated:Mar 14, 2025

Performs incremental updates on multiple tasks at a time.

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
Tasksarray<object>No

The tasks.

TaskobjectNo
IdlongYes

The task ID.

1234
EnvTypestringNo

The environment of the workspace. Valid values:

  • Prod: production environment
  • Dev: development environment
Prod
NamestringNo

The name of the task.

SQL node
DescriptionstringNo

The description of the task.

test
OwnerstringNo

The account ID of the task owner.

1000
TimeoutintegerNo

The timeout period of task running. Unit: seconds.

3600
RerunModestringNo

The rerun mode. Valid values:

  • AllDenied: The task cannot be rerun regardless of whether the task is successfully run or fails to run.
  • FailureAllowed: The task can be rerun only after it fails to run.
  • AllAllowed: The task can be rerun regardless of whether the task is successfully run or fails to run.
AllAllowed
RerunTimesintegerNo

The number of times that the task is rerun. This parameter takes effect only if the RerunMode parameter is set to AllAllowed or FailureAllowed.

3
RerunIntervalintegerNo

The rerun interval. Unit: seconds.

60
TriggerobjectNo

The trigger method.

TypestringNo

The trigger type. Valid values:

  • Scheduler: periodic scheduling
  • Manual: manual scheduling
Scheduler
RecurrencestringNo

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
CronstringNo

The CRON expression of the task. This parameter takes effect only if the Type parameter is set to Scheduler.

00 00 00 * * ?
StartTimestringNo

The start time of the time range during which the task is periodically scheduled. This parameter takes effect only if the Type parameter is set to Scheduler.

1970-01-01 00:00:00
EndTimestringNo

The end time of the time range during which the task is periodically scheduled. This parameter takes effect only if the Type parameter is set to Scheduler.

9999-01-01 00:00:00
RuntimeResourceobjectNo

The configurations of the runtime environment, such as the resource group information.

ResourceGroupIdstringNo

The ID of the resource group for scheduling configured for task running.

S_res_group_524258031846018_1684XXXXXXXXX
ImagestringNo

The ID of the image configured for task running.

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 name of the data source.

odps_test
Tagsarray<object>No

The tags.

TagobjectNo
KeystringYes

The tag key.

key1
ValuestringNo

The tag value.

value1
CommentstringNo

The remarks.

this is a comment

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

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

The result of the batch operation, which is in the MAP structure. The task ID serves as a key, and the result serves as a value.

object

The result.

Successboolean

Indicates whether the request was successful.

true
Messagestring

The error message.

The task does not exist.

Examples

Sample success responses

JSONformat

{
  "RequestId": "22C97E95-F023-56B5-8852-B1A77A17XXXX",
  "SuccessInfo": {
    "key": {
      "Success": true,
      "Message": "The task does not exist."
    }
  }
}

Error codes

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