Queries information about the historical records of all instances. One historical record is generated if an instance is rerun once.

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 ListInstanceHistory

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

InstanceId Long Yes 1234

The IDs of the instances. You can call the ListInstances operation to query the instance IDs.

RegionId String Yes cn-shanghai

The region ID. For example, the ID of the China (Shanghai) region is cn-shanghai, and that of the China (Zhangjiakou) region is cn-zhangjiakou. The system determines the value of this parameter based on the endpoint that is used to call the operation.

ProjectEnv String No PROD

The environment of the workspace. Valid values: PROD (production environment) and DEV (development environment).By default, data of instances in the production environment is queried.

Response parameters

Parameter Type Example Description
RequestId String E6F0DBDD-5AD****

The ID of the request. You can use the ID to query logs and troubleshoot issues.

Success Boolean true

Indicates whether the request is successful. Valid values:

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

The instance list.

Status String NOT_RUN

The status of the node that generates the instance. Valid values:

  • NOT_RUN: The node is not run.
  • WAIT_TIME: The node is waiting for the scheduling time to arrive.
  • WAIT_RESOURCE: The node is waiting for resources.
  • RUNNING: The node is running.
  • CHECKING: Data quality is being checked for the node.
  • CHECKING_CONDITION: Branch conditions are being checked for the node.
  • FAILURE: The node fails to be run.
  • SUCCESS: The node is successfully run.
CycTime Long 1590422400000

The time when the node started to be run. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

BeginRunningTime Long 1590416703313

The time when the instance started to be run. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

FinishTime Long 1590416703313

The time when the running of the node was complete. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

ErrorMessage String error message

The error message that is returned for the instance. This parameter is deprecated. You can call the GetInstanceLog operation to query the error information related to the node.

CreateTime Long 1590416703313

The time when the instance was generated.

DagId Long 33845

The ID of the workflow.

TaskType String NORMAL(0)

The type of the node. Valid values:

  • NORMAL(0): The node is an auto triggered node. The scheduling system regularly runs the node.
  • MANUAL(1): The node is a manually triggered node. The scheduling system does not regularly run the node.
  • PAUSE(2): The node is a frozen node. The scheduling system regularly runs the node but sets the status of the node to failed when the scheduling system starts to run the node.
  • SKIP(3): The node is a dry-run node. The scheduling system regularly runs the node but sets the status of the node to succeeded when the scheduling system starts to run the node.
  • SKIP_UNCHOOSE(4): The node is an unselected node in a temporary workflow. This type of node exists only in temporary workflows. The scheduling system sets the status of the node to succeeded when the scheduling system starts to run the node.
  • SKIP_CYCLE(5): The node is a node that is scheduled by week or month and is waiting for the scheduling time to arrive. The scheduling system regularly runs the node but sets the status of the node to succeeded when the scheduling system starts to run the node.
  • CONDITION_UNCHOOSE(6): The node is not selected by its ancestor branch node and is run as a dry-run node.
  • REALTIME_DEPRECATED(7): The node has instances that are generated in real time but deprecated. The scheduling system sets the status of the node to succeeded.
DagType String 1

Indicates whether the instance is associated with a monitoring rule in Data Quality (DQC). Valid values:

  • 0: The instance is associated with a monitoring rule in Data Quality.
  • 1: The instance is not associated with a monitoring rule in Data Quality.
ModifyTime Long 1590416703313

The time when the node was last modified.

InstanceId Long 1234

The ID of the instance.

BeginWaitResTime Long 1590416703313

The time when the instance started to wait for resources.

Bizdate Long 1590336000000

The data timestamp of the instance. In most cases, the value is one day before the time when the instance was run.

NodeName String kzh

The name of the node.

BeginWaitTimeTime Long 1590416703313

The time when the instance started to wait to be scheduled.

NodeId Long 33115

The ID of the node that generates the instance.

InstanceHistoryId Long 1

The historical record number of the instance.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListInstanceHistory
&InstanceId=1234
&ProjectEnv=PROD
&<Common request parameters>

Sample success responses

XML format

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

<ListInstanceHistoryResponse>
    <RequestId>E6F0DBDD-5AD****</RequestId>
    <Success>true</Success>
    <Instances>
        <Status>NOT_RUN</Status>
        <CycTime>1590422400000</CycTime>
        <BeginRunningTime>1590416703313</BeginRunningTime>
        <FinishTime>1590416703313</FinishTime>
        <ErrorMessage>error message</ErrorMessage>
        <CreateTime>1590416703313</CreateTime>
        <DagId>33845</DagId>
        <TaskType>NORMAL(0)</TaskType>
        <DagType>1</DagType>
        <ModifyTime>1590416703313</ModifyTime>
        <InstanceId>1234</InstanceId>
        <BeginWaitResTime>1590416703313</BeginWaitResTime>
        <Bizdate>1590336000000</Bizdate>
        <NodeName>kzh</NodeName>
        <BeginWaitTimeTime>1590416703313</BeginWaitTimeTime>
        <NodeId>33115</NodeId>
        <InstanceHistoryId>1</InstanceHistoryId>
    </Instances>
</ListInstanceHistoryResponse>

JSON format

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

{
  "RequestId" : "E6F0DBDD-5AD****",
  "Success" : true,
  "Instances" : [ {
    "Status" : "NOT_RUN",
    "CycTime" : 1590422400000,
    "BeginRunningTime" : 1590416703313,
    "FinishTime" : 1590416703313,
    "ErrorMessage" : "error message",
    "CreateTime" : 1590416703313,
    "DagId" : 33845,
    "TaskType" : "NORMAL(0)",
    "DagType" : "1",
    "ModifyTime" : 1590416703313,
    "InstanceId" : 1234,
    "BeginWaitResTime" : 1590416703313,
    "Bizdate" : 1590336000000,
    "NodeName" : "kzh",
    "BeginWaitTimeTime" : 1590416703313,
    "NodeId" : 33115,
    "InstanceHistoryId" : 1
  } ]
}

Error codes

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