Queries the information about a directed acyclic graph (DAG). You can call the GetDag operation to query the information about the DAG for a manually triggered workflow, a manually triggered node, or a data backfill instance. However, you cannot query the information about the DAG for an auto triggered node or an auto triggered workflow.
Operation description
Supported DAG types:
-
MANUAL: DAG for a manually triggered workflow
-
SMOKE_TEST: DAG for a smoke testing workflow
-
SUPPLY_DATA: DAG for a data backfill instance
-
BUSINESS_PROCESS_DAG: DAG for a one-time workflow
Supported DAG states:
-
CREATED: The DAG is created.
-
RUNNING: The DAG is running.
-
FAILURE: The DAG fails to run.
-
SUCCESS: The DAG is successfully run.
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 |
| DagId |
integer |
Yes |
The ID of the DAG. You can use one of the following method to obtain the ID:
|
123141452344525 |
| ProjectEnv |
string |
Yes |
The environment of the workspace. Valid values: PROD and DEV. |
PROD |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| RequestId |
string |
The request ID. |
7782a299-b291-4fee-8424-cf8058efa8e8 |
| ErrorMessage |
string |
The error message. |
The connection does not exist. |
| ErrorCode |
string |
The error code. |
Invalid.Tenant.ConnectionNotExists |
| Success |
boolean |
Indicates whether the request was successful. |
true |
| Data |
object |
The details of the DAG. |
|
| Type |
string |
The type of the DAG. Valid values: MANUAL, SMOKE_TEST, SUPPLY_DATA, and BUSINESS_PROCESS_DAG. The value MANUAL indicates the DAG for a manually triggered workflow. The value SMOKE_TEST indicates the DAG for a smoke testing workflow. The value SUPPLY_DATA indicates the DAG for a data backfill instance. The value BUSINESS_PROCESS_DAG indicates the DAG for a one-time workflow. |
MANUAL_FLOW |
| Status |
string |
The status of the DAG. Valid values: CREATED, RUNNING, FAILURE, and SUCCESS. |
FAILURE |
| FinishTime |
integer |
The time when the DAG finished running. |
1605052800000 |
| CreateTime |
integer |
The time when the DAG was created. |
1605052800000 |
| ProjectId |
integer |
The workspace ID. |
112345 |
| DagId |
integer |
The DAG ID. |
351249682 |
| Gmtdate |
integer |
The time when the DAG was scheduled to run. |
1605052800000 |
| StartTime |
integer |
The time when the DAG started to run. |
1605052800000 |
| CreateUser |
string |
The creator. |
1736629400048545 |
| Bizdate |
integer |
The data timestamp. |
1605052800000 |
| Name |
string |
The name of the DAG. |
test_dag |
| ModifyTime |
integer |
The time when the DAG was last modified. |
1605052800000 |
| OpSeq |
integer |
The sequence number of the operation. |
123 |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"RequestId": "7782a299-b291-4fee-8424-cf8058efa8e8",
"ErrorMessage": "The connection does not exist.",
"ErrorCode": "Invalid.Tenant.ConnectionNotExists",
"Success": true,
"Data": {
"Type": "MANUAL_FLOW",
"Status": "FAILURE",
"FinishTime": 1605052800000,
"CreateTime": 1605052800000,
"ProjectId": 112345,
"DagId": 351249682,
"Gmtdate": 1605052800000,
"StartTime": 1605052800000,
"CreateUser": "1736629400048545",
"Bizdate": 1605052800000,
"Name": "test_dag",
"ModifyTime": 1605052800000,
"OpSeq": 123
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.