All Products
Search
Document Center

DataWorks:ExecuteAdhocWorkflowInstance

Last Updated:Jan 12, 2026

Create a temporary workflow instance based on configurations.

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

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dataworks:ExecuteAdhocWorkflowInstancecreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
EnvTypestringNo

The environment of the workspace. Valid values:

  • Prod: production environment
  • Dev: development environment
Prod
NamestringYes

The name of the workflow instance.

WorkflowInstance1
ProjectIdlongYes

The workspace ID.

100
OwnerstringYes

The account ID of the owner.

1000
BizDatelongNo

The data timestamp.

1710239005403
Tasksarray<object>Yes

The tasks.

TaskobjectYes
NamestringYes

The name of the task.

SQL node.
TypestringYes

The type of the task.

ODPS_SQL
OwnerstringYes

The account ID of the owner.

1000
TimeoutintegerNo

The timeout period of task running. Unit: seconds.

3600
ScriptobjectNo

The script information.

ContentstringNo

The script content.

echo "helloWorld"
ParametersstringNo

The script parameters.

para1=$bizdate
RuntimeResourceobjectYes

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

ResourceGroupIdstringYes

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.

mysql_test
InputsobjectNo

The input information.

Variablesarray<object>No

The variables.

VariableobjectNo
NamestringNo

The name of the variable.

key1
ValuestringNo

The value of the variable. You must configure this parameter in the The ancestor output: The output variable name of the ancestor task format.

Value1
OutputsobjectNo

The output information.

TaskOutputsarray<object>No

The task outputs.

TaskOutputobjectNo
OutputstringNo

The identifier of the output.

pre.odps_sql_demo_0
Variablesarray<object>No

The variables.

VariableobjectNo
NamestringNo

The name of the variable.

key1
TypestringNo

The type. Valid values:

  • System
  • Constant
  • NodeOutput
  • PassThrough
Constant
ValuestringNo

The value of the variable.

value1
Dependenciesarray<object>No

The dependency information.

DependencyobjectNo
UpstreamOutputstringNo

The identifier of the output of the ancestor task.

pre.odps_sql_demo_0
ClientUniqueCodestringYes

The unique code of the client. This code uniquely identifies a task.

Task_0bc5213917368545132902xxxxxxxx

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

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

The workflow instance ID.

1234

Examples

Sample success responses

JSONformat

{
  "RequestId": "22C97E95-F023-56B5-8852-B1A77A17XXXX",
  "WorkflowInstanceId": 1234
}

Error codes

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

Change history

Change timeSummary of changesOperation
2025-03-20The internal configuration of the API is changed, but the call is not affectedView Change Details
2025-02-11The internal configuration of the API is changed, but the call is not affectedView Change Details