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 ID of the region where the DataWorks workspace resides. 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 that is used to call the operation.

ProjectEnv String Yes PROD

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

ProjectId Long Yes 12345

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

NodeId Long Yes 100000000000

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

NodeName String No openmr_8****

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

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

BizName String No test_bizName

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

ProgramType String No ODPS_SQL

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

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.

You cannot specify the sorting method for the instances to be returned by this operation. By default, the instances are sorted in reverse chronological order based on the IDs of the instances and the time when the instances were created.

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 data timestamp of the instances that you want to query. 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 information about 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 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 January 1, 1970, 00:00:00 UTC.

BeginWaitTimeTime Long 1590416703313

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

Bizdate Long 1590336000000

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

BusinessId Long 123

The ID of the workflow.

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 January 1, 1970, 00:00:00 UTC.

CycTime Long 1590422400000

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

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 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 is 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 query the error information related to the node.

FinishTime Long 1590416703313

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

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 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 related to the node.

Priority Integer 1

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

RelatedFlowId Long 123456

The ID of the workflow to which the node belongs.

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 node 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 for its scheduled 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 run.
  • SUCCESS: The node is successfully run.
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, which is an integer 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 once. If the value of this parameter is 2, the node can be rerun twice.
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 on a regular basis 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 on a regular basis 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 scheduled time does not arrive. The scheduling system still runs the node on a regular basis 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 run as a dry-run node.

    REALTIME_DEPRECATED(7): The node has instances generated in real time but 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 locate logs and troubleshoot issues based on the ID.

Success Boolean true

Indicates whether the request was 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>
        <BusinessId>123</BusinessId>
        <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,
            "BusinessId": 123,
            "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.