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 obtain the ID.

NodeId Long Yes 100000000000

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

NodeName String No openmr_8****

The name of the node. You can call the ListNodes operation to obtain 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 obtain the name.

ProgramType String No ODPS_SQL

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

PageNumber Integer No 1

The number of the page to return.

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 the value 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 to 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 list of instances.

Instances Array of Instance

The details of the instance.

BaselineId Long 123123

The ID of the baseline.

BeginRunningTime Long 1590416703313

The time when the instance started to 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.

BeginWaitResTime Long 1590416703313

The time when the instance started to wait for resources. 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.

BeginWaitTimeTime Long 1590416703313

The time when the instance started to wait 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.

Bizdate Long 1590336000000

The date on which the instance was run. In most cases, the value is one day before the time when the instance is run.

Connection String odps_first

The connection string.

CreateTime Long 1590416703313

The time when the instance was created. 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.

CycTime Long 1590422400000

The time when the node was run.

DagId Long 33845

The ID of the DAG.

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 generate retroactive 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.

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

NodeId Long 33115

The ID of the node.

NodeName String kzh

The name of the node.

ParamValues String bizdate=$bizdate tbods=$tbods

The parameters.

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. Unit: milliseconds. The interval is the one that is adjusted after the node fails to be run.

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 be run.
  • SUCCESS: The running of the node is successful.
TaskType String NORMAL(0)

The 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 paused. 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 returned.

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>
        <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)",
            "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.