GetWorkflow
Retrieves the details of a specified workflow.
Operation description
You must purchase DataWorks Basic Edition or higher to use this feature.
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 unique identifier of the workflow. |
1234 |
| EnvType |
string |
No |
The project environment. Valid values:
Valid values:
|
Prod |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. You can use the ID to locate logs and troubleshoot issues. |
22C97E95-F023-56B5-8852-B1A77A17XXXX |
| Workflow |
object |
The details of the workflow. |
|
| Id |
integer |
The unique identifier of the workflow. |
1234 |
| ProjectId |
integer |
The ID of the project. |
100 |
| EnvType |
string |
The project environment. Valid values:
|
Prod |
| Owner |
string |
The account ID of the owner. |
1000 |
| Name |
string |
The name. |
Workflow |
| Description |
string |
The description. |
Test workflow |
| Trigger |
object |
The trigger configuration. |
|
| Type |
string |
The type of the trigger method. Valid values:
|
Scheduler |
| Recurrence |
string |
The execution mode when triggered. This parameter takes effect when type is set to Scheduler. Valid values:
|
Normal |
| Cron |
string |
The cron expression. This parameter takes effect only when Type is set to Scheduler. |
00 00 00 * * ? |
| StartTime |
string |
The effective time of the periodic trigger. This parameter takes effect only when Type is set to Scheduler. The time is in the |
1970-01-01 00:00:00 |
| EndTime |
string |
The expiration time of the periodic trigger. This parameter takes effect only when Type is set to Scheduler. The time is in the |
1970-01-01 00:00:00 |
| Dependencies |
array<object> |
The dependency information. |
|
|
object |
|||
| Type |
string |
The dependency type. Valid values:
|
Normal |
| UpstreamOutput |
string |
The output identifier of the upstream task. This field is returned when the dependency type is Normal and the input content is configured. |
pre.odps_sql_demo_0 |
| UpstreamTaskId |
integer |
The ID of the upstream task. This field is returned when the dependency type is CrossCycleDependsOnOtherNode or Normal without input content configured. It is not returned in other cases. |
1234 |
| Parameters |
string |
The list of parameters. |
para1=$bizdate para2=$[yyyymmdd] |
| Tasks |
array<object> |
The list of nodes. |
|
|
array<object> |
|||
| Id |
integer |
The ID of the node. |
1234 |
| ProjectId |
integer |
The ID of the project. |
100 |
| EnvType |
string |
The project environment. Valid values:
|
Prod |
| Owner |
string |
The account ID of the node owner. |
1000 |
| Name |
string |
The name of the node. |
SQL node |
| Description |
string |
The description. |
Test |
| WorkflowId |
integer |
The ID of the workflow to which the node belongs. |
1234 |
| Type |
string |
The type of the node. |
ODPS_SQL |
| BaselineId |
integer |
The ID of the baseline. |
1234 |
| Priority |
integer |
The priority of the node. Valid values: 1 to 8. A larger value indicates a higher priority. Default value: 1. |
1 |
| Timeout |
integer |
The timeout period for node execution, in seconds. |
3600 |
| RerunMode |
string |
The configuration that specifies whether a node can be rerun. Valid values:
|
AllAllowed |
| RerunTimes |
integer |
The number of retries. This parameter takes effect only when the node is configured to be rerunnable. |
3 |
| RerunInterval |
integer |
The retry time interval, in seconds. |
60 |
| RuntimeResource |
object |
The runtime environment configuration, such as the resource group information. |
|
| ResourceGroupId |
string |
The identifier of the resource group for scheduling configured for node execution. |
S_res_group_524258031846018_1684XXXXXXXXX |
| Image |
string |
The ID of the image configured for node execution. |
i-xxxxxx |
| Cu |
string |
The CU consumption configured for node execution. |
0.25 |
| DataSource |
object |
The associated data source information. |
|
| Name |
string |
The name of the data source. |
mysql_test |
| CreateTime |
integer |
The creation time. The time is a 13-digit timestamp, such as |
1710239005403 |
| ModifyTime |
integer |
The modification time. The time is a 13-digit timestamp, such as |
1710239005403 |
| CreateUser |
string |
The account ID of the user who created the node. |
1000 |
| ModifyUser |
string |
The account ID of the user who last modified the node. |
1000 |
| TriggerRecurrence |
string |
The running mode when the trigger is fired. Valid values:
|
Normal |
| ClientUniqueCode |
string |
The client unique code of the node, which is used to implement asynchronous and idempotent operations. If you do not specify this parameter when creating the node, the system automatically generates a code and uniquely binds it to the resource ID. If you specify this parameter when updating or deleting the resource, it must be the same as the client unique code used during creation. |
Task_0bc5213917368545132902xxxxxxxx |
| Outputs |
object |
The output information. |
|
| TaskOutputs |
array<object> |
The list of node output definitions. |
|
|
object |
|||
| Output |
string |
The output identifier. |
pre.odps_sql_demo_0 |
| Tags |
array<object> |
The list of tags. |
|
|
object |
|||
| Key |
string |
The tag key. |
key1 |
| Value |
string |
The tag value. |
value1 |
| CreateTime |
integer |
The creation time. The time is a 13-digit timestamp, such as |
1710239005403 |
| ModifyTime |
integer |
The modification time. The time is a 13-digit timestamp, such as |
1710239005403 |
| CreateUser |
string |
The account ID of the user who created the workflow. |
1000 |
| ModifyUser |
string |
The account ID of the user who last modified the workflow. |
1000 |
| ClientUniqueCode |
string |
The client unique code of the workflow, which is used to implement asynchronous and idempotent operations. If you do not specify this parameter when creating the workflow, the system automatically generates a code and uniquely binds it to the resource ID. If you specify this parameter when updating or deleting the resource, it must be the same as the client unique code used during creation. |
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.