Queries the details about an instance.

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 GetInstance

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

InstanceId Long Yes 1234

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

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 that is 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, and the value DEV indicates the development environment.

Response parameters

Parameter Type Example Description
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.

ErrorMessage String test

The error message returned because the instance fails to be scheduled.

Success Boolean true

Indicates whether the request is successful.

ErrorCode String 0

The error code returned.

Data Object

The details about the instance.

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 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.
CycTime Long 1590422400000

The scheduled time of the instance.

BeginRunningTime Long 1590416703313

The time when the instance started to run.

FinishTime Long 1590416703313

The time when the running of the instance was complete.

CreateTime Long 1590416703313

The time when the instance was generated.

DagId Long 338450167

The ID of the workflow.

Priority Integer 1

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

TaskType String NORMAL(0)

The scheduling type of the node that generates the instance. 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 node that is scheduled by week or month and is waiting for its scheduled time. 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 the node to SUCCESS.
ParamValues String bizdate=$bizdate tbods=$tbods tbdw=$tbdw tbpmic=$tbpmic tbpidx=$tbpidx tbptcif=$tbptcif

The values of the parameters related to the node.

Connection String odps_first

The connection string.

BaselineId Long 123123

The ID of the baseline.

DqcType Integer 1

Indicates whether the instance is associated with a monitoring rule in Data Quality. 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.
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.
BusinessId Long 123

The ID of the workflow.

TaskRerunTime Integer 0

The number of times the node that generates 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 once. If the value of this parameter is 2, the node can be rerun two times, and so on.
ModifyTime Long 1590416703313

The time when the instance was last modified.

Repeatability Boolean true

Indicates whether the node that generates the instance can be rerun.

RepeatInterval Long 60000

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

InstanceId Long 11713307578

The ID of the instance.

BeginWaitResTime Long 1590416703313

The time when the instance started to wait for resources.

RelatedFlowId Long 123123

The ID of the workflow to which the node that generates the instance belongs.

Bizdate Long 1590336000000

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

NodeName String kzh

The name of the node that generates the instance.

BeginWaitTimeTime Long 1590416703313

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

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.

NodeId Long 33115

The ID of the node that generates the instance.

CreateUser String 111

The owner of the instance.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetInstance
&InstanceId=1234
&ProjectEnv=PROD
&RegionId=cn-shanghai
&<Common request parameters>

Sample success responses

XML format

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

<RequestId>E6F0DBDD-5AD****</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<Data>
    <BaselineId>123123</BaselineId>
    <ModifyTime>1590416703313</ModifyTime>
    <NodeName>kzh</NodeName>
    <DagType>DAILY</DagType>
    <ParamValues>bizdate=$bizdate tbods=$tbods tbdw=$tbdw tbpmic=$tbpmic tbpidx=$tbpidx tbptcif=$tbptcif</ParamValues>
    <DagId>338450167</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>
    <TaskRetunTime>0</TaskRetunTime>
    <InstanceId>11713307578</InstanceId>
    <DqcType>1</DqcType>
    <Priority>1</Priority>
    <CreateTime>1590416703313</CreateTime>
    <Connection>odps_first</Connection>
    <RelatedFlowId>123123</RelatedFlowId>
    <BeginWaitTimeTime>1590416703313</BeginWaitTimeTime>
    <CycTime>1590422400000</CycTime>
    <Repeatability>true</Repeatability>
    <NodeId>33115</NodeId>
    <BeginWaitResTime>1590416703313</BeginWaitResTime>
    <ErrorMessage>error message</ErrorMessage>
    <RepeatInterval>60000</RepeatInterval>
</Data>
<ErrorCode>0</ErrorCode>
<ErrorMessage>test</ErrorMessage>
<Success>true</Success>

JSON format

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

{
  "RequestId" : "E6F0DBDD-5AD****",
  "HttpStatusCode" : 200,
  "Data" : {
    "BaselineId" : 123123,
    "ModifyTime" : 1590416703313,
    "NodeName" : "kzh",
    "DagType" : "DAILY",
    "ParamValues" : "bizdate=$bizdate tbods=$tbods tbdw=$tbdw tbpmic=$tbpmic tbpidx=$tbpidx tbptcif=$tbptcif",
    "DagId" : 338450167,
    "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)",
    "TaskRetunTime" : 0,
    "InstanceId" : 11713307578,
    "DqcType" : 1,
    "Priority" : 1,
    "CreateTime" : 1590416703313,
    "Connection" : "odps_first",
    "RelatedFlowId" : 123123,
    "BeginWaitTimeTime" : 1590416703313,
    "CycTime" : 1590422400000,
    "Repeatability" : true,
    "NodeId" : 33115,
    "BeginWaitResTime" : 1590416703313,
    "ErrorMessage" : "error message",
    "RepeatInterval" : 60000
  },
  "ErrorCode" : 0,
  "ErrorMessage" : "test",
  "Success" : true
}

Error codes

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