All Products
Search
Document Center

DataWorks:GetDag

Last Updated:Mar 30, 2026

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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:

  • Call the RunCycleDagNodes operation and obtain the value of the Data response parameter.

  • Call the RunSmokeTest operation and obtain the value of the Data response parameter.

  • Call the RunManualDagNodes operation and obtain the value of the DagId response parameter.

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.