All Products
Search
Document Center

Data Management:ListTaskFlowInstance

Last Updated:Nov 28, 2024

Queries the execution records of a task flow.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dms:ListTaskFlowInstancelist
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DagIdlongYes

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

7***
TriggerTypeintegerNo

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.
1
StartTimeBeginstringNo

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

2022-01-07
StartTimeEndstringNo

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

2022-04-08
PageIndexintegerYes

The number of the page to return.

1
PageSizeintegerYes

The number of entries to return on each page.

20
TidlongNo

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

3***
UseBizDatebooleanNo

Adjust filter conditions:

  • true: StartTimeBegin and StartTimeEnd are the time range for filtering services.

  • false: StartTimeBegin and StartTimeEnd are the time range for the task to run.

true
StatusintegerNo

The running status of the task node. Valid values:

  • 0: Waiting for scheduling

  • 1: Running

  • 2: Suspend

  • 3: Failed to run

  • 4: Run successfully

  • 5: Completed

3

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

8CFF2295-8249-5287-B888-DBD4F0D76CB0
ErrorCodestring

The error code returned if the request fails.

UnknownError
ErrorMessagestring

The error message returned if the request fails.

UnknownError
Successboolean

Indicates whether the request is successful. Valid values:

  • true: The request is successful.
  • false: The request fails.
true
DAGInstanceListarray<object>

The information about the execution records returned.

DAGInstanceobject
Idlong

The ID of the execution record.

9234
BusinessTimestring

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

2021-11-10 14:37:26
startTimestring

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

2021-11-11 14:35:57
EndTimestring

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

2021-11-11 14:38:57
DagIdstring

The ID of the task flow.

7***
TriggerTypeinteger

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.
1
Statusinteger

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.
4
Messagestring

The description of the task.

test
HistoryDagIdlong

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

2****
DagNamestring

The name of the task flow.

Spark_SQL_test
OwnerNamestring

The name of the task flow owner.

test_name
DagVersionstring

The version of the task flow.

[]
TotalCountinteger

The total number of execution records returned.

1

Examples

Sample success responses

JSONformat

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

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-05-25The request parameters of the API has changed. The response structure of the API has changedView Change Details