Queries the information about a workflow.
Operation description
This API operation is available for all DataWorks editions.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:* |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Id |
integer |
Yes |
The workflow ID. |
1234 |
| EnvType |
string |
No |
The environment of the workspace. Valid values:
|
Prod |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
22C97E95-F023-56B5-8852-B1A77A17XXXX |
| Workflow |
object |
The information about the workflow. |
|
| Id |
integer |
The workflow ID. |
1234 |
| ProjectId |
integer |
The workspace ID. |
100 |
| EnvType |
string |
The environment of the workspace. Valid values:
|
Prod |
| Owner |
string |
The account ID of the workflow owner. |
1000 |
| Name |
string |
The name of the workflow. |
Workflow |
| Description |
string |
The description of the workflow. |
Test workflow |
| Trigger |
object |
The trigger method. |
|
| Type |
string |
The trigger type. Valid values:
|
Scheduler |
| Recurrence |
string |
The running mode of the workflow after it is triggered. This parameter takes effect only if the Type parameter is set to Scheduler. Valid values:
|
Normal |
| Cron |
string |
The CRON expression. This parameter takes effect only if the Type parameter is set to Scheduler. |
00 00 00 * * ? |
| StartTime |
string |
The start time of the time range during which the workflow is periodically scheduled. This parameter takes effect only if the Type parameter is set to Scheduler. |
1970-01-01 00:00:00 |
| EndTime |
string |
The end time of the time range during which the workflow is periodically scheduled. This parameter takes effect only if the Type parameter is set to Scheduler. |
1970-01-01 00:00:00 |
| Dependencies |
array<object> |
The dependency information. |
|
|
object |
|||
| Type |
string |
The scheduling dependency type. Valid values:
|
Normal |
| UpstreamOutput |
string |
The identifier of the output of the ancestor task. This parameter is returned only if |
pre.odps_sql_demo_0 |
| UpstreamTaskId |
integer |
The ancestor task ID. This parameter is returned only if |
1234 |
| Parameters |
string |
The parameters. |
para1=$bizdate para2=$[yyyymmdd] |
| Tasks |
array<object> |
The tasks. |
|
|
array<object> |
|||
| Id |
integer |
The task ID. |
1234 |
| ProjectId |
integer |
The workspace ID. |
100 |
| EnvType |
string |
The environment of the workspace. Valid values:
|
Prod |
| Owner |
string |
The account ID of the task owner. |
1000 |
| Name |
string |
The name of the task. |
SQL node |
| Description |
string |
The description of the task. |
Test |
| WorkflowId |
integer |
The ID of the workflow to which the task belongs. |
1234 |
| Type |
string |
The type of the task. |
ODPS_SQL |
| BaselineId |
integer |
The baseline ID. |
1234 |
| Priority |
integer |
The priority of the task. Valid values: 1 to 8. A larger value indicates a higher priority. Default value: 1. |
1 |
| Timeout |
integer |
The timeout period of task running. Unit: seconds. |
3600 |
| RerunMode |
string |
The rerun mode. Valid values:
|
AllAllowed |
| RerunTimes |
integer |
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 |
| RerunInterval |
integer |
The rerun interval. Unit: seconds. |
60 |
| RuntimeResource |
object |
The configurations of the runtime environment, such as the resource group information. |
|
| ResourceGroupId |
string |
The ID of the resource group for scheduling configured for task running. |
S_res_group_524258031846018_1684XXXXXXXXX |
| Image |
string |
The ID of the image configured for task running. |
i-xxxxxx |
| Cu |
string |
The default number of compute units (CUs) configured for task running. |
0.25 |
| DataSource |
object |
The information about the associated data source. |
|
| Name |
string |
The name of the data source. |
mysql_test |
| CreateTime |
integer |
The creation time. |
1710239005403 |
| ModifyTime |
integer |
The modification time. |
1710239005403 |
| CreateUser |
string |
The account ID of the creator. |
1000 |
| ModifyUser |
string |
The account ID of the modifier. |
1000 |
| TriggerRecurrence |
string |
The running mode of the task after it is triggered. Valid values:
|
Normal |
| ClientUniqueCode |
string |
The unique code of the client. This parameter is used to create a task asynchronously and implement the idempotence of the task. If you do not specify this parameter when you create the task, the system automatically generates a unique code. The unique code is uniquely associated with the task ID. If you specify this parameter when you update or delete the task, the value of this parameter must be the unique code that is used to create the task. |
Task_0bc5213917368545132902xxxxxxxx |
| Outputs |
object |
The output information. |
|
| TaskOutputs |
array<object> |
The task outputs. |
|
|
object |
|||
| Output |
string |
The identifier of the output. |
pre.odps_sql_demo_0 |
| Tags |
array<object> |
The tags. |
|
|
object |
|||
| Key |
string |
The tag key. |
key1 |
| Value |
string |
The tag value. |
value1 |
| CreateTime |
integer |
The creation time. |
1710239005403 |
| ModifyTime |
integer |
The modification time. |
1710239005403 |
| CreateUser |
string |
The account ID of the creator. |
1000 |
| ModifyUser |
string |
The account ID of the modifier. |
1000 |
| ClientUniqueCode |
string |
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 |
Examples
Success response
JSON format
{
"RequestId": "22C97E95-F023-56B5-8852-B1A77A17XXXX",
"Workflow": {
"Id": 1234,
"ProjectId": 100,
"EnvType": "Prod",
"Owner": "1000",
"Name": "Workflow",
"Description": "Test workflow",
"Trigger": {
"Type": "Scheduler",
"Recurrence": "Normal",
"Cron": "00 00 00 * * ?",
"StartTime": "1970-01-01 00:00:00",
"EndTime": "1970-01-01 00:00:00"
},
"Dependencies": [
{
"Type": "Normal",
"UpstreamOutput": "pre.odps_sql_demo_0",
"UpstreamTaskId": 1234
}
],
"Parameters": "para1=$bizdate para2=$[yyyymmdd] ",
"Tasks": [
{
"Id": 1234,
"ProjectId": 100,
"EnvType": "Prod",
"Owner": "1000",
"Name": "SQL node",
"Description": "Test",
"WorkflowId": 1234,
"Type": "ODPS_SQL",
"BaselineId": 1234,
"Priority": 1,
"Timeout": 3600,
"RerunMode": "AllAllowed",
"RerunTimes": 3,
"RerunInterval": 60,
"RuntimeResource": {
"ResourceGroupId": "S_res_group_524258031846018_1684XXXXXXXXX",
"Image": "i-xxxxxx",
"Cu": "0.25"
},
"DataSource": {
"Name": "mysql_test"
},
"CreateTime": 1710239005403,
"ModifyTime": 1710239005403,
"CreateUser": "1000",
"ModifyUser": "1000",
"TriggerRecurrence": "Normal",
"ClientUniqueCode": "Task_0bc5213917368545132902xxxxxxxx"
}
],
"Outputs": {
"TaskOutputs": [
{
"Output": "pre.odps_sql_demo_0"
}
]
},
"Tags": [
{
"Key": "key1",
"Value": "value1"
}
],
"CreateTime": 1710239005403,
"ModifyTime": 1710239005403,
"CreateUser": "1000",
"ModifyUser": "1000",
"ClientUniqueCode": "Workflow_0bc5213917368545132902xxxxxxxx"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.