Queries the execution records of a task flow.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListTaskFlowInstance

The operation that you want to perform. Set the value to ListTaskFlowInstance.

DagId Long Yes 7***

The ID of the task flow. You can call the ListTaskFlow or ListLhTaskFlowAndScenario operation to obtain the ID of the task flow.

TriggerType Integer No 1

The mode in which the task flow is triggered. Valid values:

  • 0: The task flow is automatically triggered based on periodic scheduling.
  • 1: The task flow is manually triggered.
StartTimeBegin String No 2022-01-07

The beginning of the time range to query the execution records of the task flow. Specify the time in the yyyy-MM-DD format.

StartTimeEnd String No 2022-04-08

The end of the time range to query the execution records of the task flow. Specify the time in the yyyy-MM-DD format.

PageIndex Integer Yes 1

The number of the page to return.

PageSize Integer Yes 20

The number of entries to return on each page.

Tid Long No 3***

The ID of the tenant. You can call the GetUserActiveTenant or ListUserTenants operation to obtain the tenant ID.

RegionId String No cn-hangzhou

The region in which Data Management (DMS) is activated. For more information, see RegionID parameter.

Response parameters

Parameter Type Example Description
RequestId String 8CFF2295-8249-5287-B888-DBD4F0D76CB0

The ID of the request.

ErrorCode String UnknownError

The error code returned if the request fails.

ErrorMessage String UnknownError

The error message returned if the request fails.

Success Boolean true

Indicates whether the request is successful. Valid values:

  • true: The request is successful.
  • false: The request fails.
DAGInstanceList Array of DAGInstance

The information about the execution records returned.

DAGInstance
Id Long 9234

The ID of the execution record.

BusinessTime String 2021-11-10 14:37:26

The business time of the task flow. The time is displayed in the yyyy-MM-DD HH:mm:ss format.

EndTime String 2021-11-11 14:38:57

The time when the execution of the task flow was complete. The time is displayed in the yyyy-MM-DD HH:mm:ss format.

DagId String 7***

The ID of the task flow.

TriggerType Integer 1

The mode in which the task flow is triggered. Valid values:

  • 0: The task flow is automatically triggered based on periodic scheduling.
  • 1: The task flow is manually triggered.
Status Integer 4

The status of the task flow. Valid values:

  • 0: The task flow is waiting to be scheduled.
  • 1: The task flow is being executed.
  • 2: The task flow is paused.
  • 3: The task flow failed.
  • 4: The task flow is executed.
  • 5: The task flow is complete.
Message String test

The description of the task.

HistoryDagId Long 2****

The ID of the previously published version of the task flow.

DagName String Spark_SQL_test

The name of the task flow.

OwnerName String test_name

The name of the task flow owner.

TotalCount Integer 1

The total number of execution records returned.

Examples

Sample requests

http(s)://dms-enterprise.aliyuncs.com/?Action=ListTaskFlowInstance
&DagId=7***
&TriggerType=1
&StartTimeBegin=2022-01-07
&StartTimeEnd=2022-04-08
&PageIndex=1
&PageSize=20
&Tid=3***
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListTaskFlowInstanceResponse>
    <RequestId>8CFF2295-8249-5287-B888-DBD4F0D76CB0</RequestId>
    <Success>true</Success>
    <DAGInstanceList>
        <Id>9234</Id>
        <BusinessTime>2021-11-10 14:37:26</BusinessTime>
        <EndTime>2021-11-11 14:38:57</EndTime>
        <DagId>7***</DagId>
        <TriggerType>1</TriggerType>
        <Status>4</Status>
        <Message>test</Message>
        <DagName>Spark_SQL_test</DagName>
        <OwnerName>test_name</OwnerName>
    </DAGInstanceList>
    <TotalCount>1</TotalCount>
</ListTaskFlowInstanceResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "8CFF2295-8249-5287-B888-DBD4F0D76CB0",
  "Success" : true,
  "DAGInstanceList" : [ {
    "Id" : 9234,
    "BusinessTime" : "2021-11-10 14:37:26",
    "EndTime" : "2021-11-11 14:38:57",
    "DagId" : "7***",
    "TriggerType" : 1,
    "Status" : 4,
    "Message" : "test",
    "DagName" : "Spark_SQL_test",
    "OwnerName" : "test_name"
  } ],
  "TotalCount" : 1
}

Error codes

For a list of error codes, visit the API Error Center.