All Products
Search
Document Center

Data Management:ListTaskFlowInstance

Last Updated:Oct 21, 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

There is currently no authorization information disclosed in the API.

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