Queries instances.

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 ListInstances

The operation that you want to perform.

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 automatically determines the value of this parameter based on the endpoint used to call the operation.

ProjectEnv String Yes PROD

The environment of the workspace. Valid values: PROD and DEV. The value PROD indicates the production environment. The value DEV indicates the development environment.

ProjectId Long Yes 12345

The ID of the workspace. You can call the ListProjects operation to query the ID.

NodeId Long Yes 100000000000

The ID of the node. You can call the ListNodes operation to query the ID.

NodeName String No openmr_8****

The name of the node. You can call the ListNodes operation to query the name.

Owner String No 193379****

The ID of the Alibaba Cloud account used by the workspace administrator. You can log on to the Alibaba Cloud Management Console and view the ID on the Security Settings page of the Account Management console.

BizName String No test_bizName

The name of the workflow. You can call the ListBusiness operation to query the name.

ProgramType String No ODPS_SQL

The type of the node. You can call the ListNodes operation to query the type.

PageNumber Integer No 1

The number of the page to return. Minimum value: 1. Maximum value: 100.

PageSize Integer No 10

The number of entries to return on each page. Default value: 10. Maximum value: 100.

DagId Long No 11111

The ID of the directed acyclic graph (DAG). You can set this parameter to the value of the DagId parameter returned by the CreateDagComplement, CreateTest, or CreateManualDag operation.

Bizdate String No 2020-02-02 00:00:00

The time when you query instances. Specify the time in the yyyy-MM-dd HH:mm:ss format.

BeginBizdate String No 2020-02-02 00:00:00

The beginning of the time range to query. Specify the time in the yyyy-MM-dd HH:mm:ss format.

EndBizdate String No 2020-02-03 00:00:00

The end of the time range to query. Specify the time in the yyyy-MM-dd HH:mm:ss format.

Response parameters

Parameter Type Example Description
Data Struct

The instances returned.

Instances Array of Instance

The details of the instances.

BaselineId Long 123123

The ID of the baseline.

BeginRunningTime Long 1590416703313

The time when the instance started to run.

BeginWaitResTime Long 1590416703313

The time when the instance started to wait for resources.

BeginWaitTimeTime Long 1590416703313

The time when the instance started waiting to be run.

Bizdate Long 1590336000000

The date on which the node was scheduled. In most cases, the date is one day before the node is run.

Connection String odps_first

The connection string.

CreateTime Long 1590416703313

The time when the instance was created.

CycTime Long 1590422400000

The time when the node was run.

DagId Long 33845

The ID of the workflow.

DagType String DAILY

The type of the workflow. Valid values:

  • DAILY: The workflow is used to run auto triggered nodes.
  • MANUAL: The workflow is used to run manually triggered nodes.
  • SMOKE_TEST: The workflow is used to perform smoke testing.
  • SUPPLY_DATA: The workflow is used to backfill data.
DqcDescription String [{"projectName":"ztjy_dim","tableName":"dim_user_agent_manage_area_a","partition":"ds\u003d$[yyyy-mm-dd-1]"}]

The table and partition filter expression in Data Quality that are associated with the instance.

DqcType Integer 1

Indicates whether the instance is associated with Data Quality. Valid values:

  • 0: The instance is associated with Data Quality.
  • 1: The instance is not associated with Data Quality.
ErrorMessage String error message

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

FinishTime Long 1590416703313

The time when the running of the node was complete.

InstanceId Long 1234

The ID of the instance.

ModifyTime Long 1590416703313

The time when the node was last modified.

NodeId Long 33115

The ID of the node.

NodeName String kzh

The name of the node.

ParamValues String bizdate=$bizdate tbods=$tbods

The values of the parameters related to the node.

Priority Integer 1

The priority of the instance. Valid values: 1, 3, 5, 7, and 8. A large value indicates a high priority. Default value: 1.

RelatedFlowId Long 123456

The ID of the associated workflow.

RepeatInterval Long 60000

The interval at which the node is rerun after the node fails to run. Unit: milliseconds.

Repeatability Boolean true

Indicates whether the instance can be rerun.

Status String NOT_RUN

The status of the node. Valid values:

  • NOT_RUN: The node is not run.
  • WAIT_TIME: The node is waiting to be run.
  • 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 run.
  • SUCCESS: The running of the node is successful.
TaskRerunTime Integer 0

The number of times the node that corresponds to the instance can be rerun. This parameter can be left empty, or the value of this parameter can be an integer that is greater than or equal to 0.

  • If this parameter is left empty, the number of rerun times is not specified for the node.
  • If the value of this parameter is 0, the node cannot be rerun.
  • If the value of this parameter is n (an integer that is greater than 0), the node can be rerun n times. For example, if the value of this parameter is 1, the node can be rerun one time. If the value of this parameter is 2, the node can be rerun two times, and so on.
TaskType String NORMAL(0)

The scheduling type of the node. Valid values:

  • NORMAL(0): The node is an auto triggered node. It is run on a regular basis.
  • MANUAL(1): The node is a manually triggered node. It is not run on a regular basis.
  • PAUSE(2): The node is a frozen node. The scheduling system still runs the node but sets it to FAILURE when the scheduling system starts to run the node.
  • SKIP(3): The node is a dry-run node. The scheduling system still runs the node but sets it to SUCCESS 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 node to SUCCESS when the scheduling system starts to run the node.
  • SKIP_CYCLE(5): The node is a weekly or monthly node whose running cycle does not arrive. The scheduling system still runs the node but sets it to SUCCESS when the scheduling system starts to run the node.
  • CONDITION_UNCHOOSE(6): The node is not selected by its ancestor branch node and is set to a dry-run node.

    REALTIME_DEPRECATED(7): The node is generated in real time but is deprecated. The scheduling system directly sets it to SUCCESS.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 10

The number of entries returned per page. Default value: 10. Maximum value: 100.

TotalCount Integer 66

The total number of instances.

ErrorCode String Invalid.Tenant.ProjectNotExists

The error code returned.

ErrorMessage String The project does not exist.

The error message returned.

HttpStatusCode Integer 200

The HTTP status code returned.

RequestId String E6F0DBDD-5AD****

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

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListInstances
&RegionId=cn-shanghai
&ProjectEnv=PROD
&ProjectId=12345
&NodeId=100000000000
&<Common request parameters>

Sample success responses

XML format

<RequestId>E6F0DBDD-5AD****</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<Data>
    <Instances>
        <BaselineId>123123</BaselineId>
        <ModifyTime>1590416703313</ModifyTime>
        <NodeName>kzh</NodeName>
        <DagType>DAILY</DagType>
        <ParamValues>bizdate=$bizdate tbods=$tbods</ParamValues>
        <DagId>33845</DagId>
        <BeginRunningTime>1590416703313</BeginRunningTime>
        <Bizdate>1590336000000</Bizdate>
        <FinishTime>1590416703313</FinishTime>
        <DqcDescription>[{"projectName":"ztjy_dim","tableName":"dim_user_agent_manage_area_a","partition":"ds\u003d$[yyyy-mm-dd-1]"}]</DqcDescription>
        <Status>NOT_RUN</Status>
        <TaskType>NORMAL(0)</TaskType>
        <TaskRerunTime>0</TaskRerunTime>
        <InstanceId>1234</InstanceId>
        <DqcType>1</DqcType>
        <Priority>1</Priority>
        <CreateTime>1590416703313</CreateTime>
        <Connection>odps_first</Connection>
        <RelatedFlowId>123456</RelatedFlowId>
        <BeginWaitTimeTime>1590416703313</BeginWaitTimeTime>
        <CycTime>1590422400000</CycTime>
        <Repeatability>true</Repeatability>
        <NodeId>33115</NodeId>
        <BeginWaitResTime>1590416703313</BeginWaitResTime>
        <ErrorMessage>error message</ErrorMessage>
        <RepeatInterval>60000</RepeatInterval>
    </Instances>
    <TotalCount>66</TotalCount>
    <PageSize>10</PageSize>
    <PageNumber>1</PageNumber>
</Data>
<ErrorCode>Invalid.Tenant.ProjectNotExists</ErrorCode>
<ErrorMessage>The project does not exist.</ErrorMessage>
<Success>true</Success>

JSON format

{
    "RequestId": "E6F0DBDD-5AD****",
    "HttpStatusCode": 200,
    "Data": {
        "Instances": {
            "BaselineId": 123123,
            "ModifyTime": 1590416703313,
            "NodeName": "kzh",
            "DagType": "DAILY",
            "ParamValues": "bizdate=$bizdate tbods=$tbods",
            "DagId": 33845,
            "BeginRunningTime": 1590416703313,
            "Bizdate": 1590336000000,
            "FinishTime": 1590416703313,
            "DqcDescription": "[{\"projectName\":\"ztjy_dim\",\"tableName\":\"dim_user_agent_manage_area_a\",\"partition\":\"ds\\u003d$[yyyy-mm-dd-1]\"}]",
            "Status": "NOT_RUN",
            "TaskType": "NORMAL(0)",
            "TaskRerunTime": 0,
            "InstanceId": 1234,
            "DqcType": 1,
            "Priority": 1,
            "CreateTime": 1590416703313,
            "Connection": "odps_first",
            "RelatedFlowId": 123456,
            "BeginWaitTimeTime": 1590416703313,
            "CycTime": 1590422400000,
            "Repeatability": true,
            "NodeId": 33115,
            "BeginWaitResTime": 1590416703313,
            "ErrorMessage": "error message",
            "RepeatInterval": 60000
        },
        "TotalCount": 66,
        "PageSize": 10,
        "PageNumber": 1
    },
    "ErrorCode": "Invalid.Tenant.ProjectNotExists",
    "ErrorMessage": "The project does not exist.",
    "Success": true
}

Error codes

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