Queries the ancestor nodes of a node.

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 GetNodeParents

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

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

NodeId Long Yes 12345456211234

The ID of the node. You can go to the Operation Center page in the DataWorks console to view the node ID.

Response parameters

Parameter Type Example Description
HttpStatusCode Integer 200

The HTTP status code returned.

RequestId String asdfasdfas-adfasdf-asfas-dfasdf-asdf

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

ErrorMessage String err

The error message returned.

ErrorCode String 1060010000000

The error code returned.

Success Boolean true

Indicates whether the request is successful.

Data Object

The information of the ancestor nodes.

Nodes Array of Nodes

The ancestor nodes returned.

SchedulerType String NORMAL

The scheduling type of the node. Valid values:

  • NORMAL: indicates that the node is an auto triggered node.
  • MANUAL: indicates that the node is a manually triggered node.
  • PAUSE: indicates that the node is a paused node. Paused nodes are started as scheduled but the system sets the status of the nodes to failed when it starts to run them.
  • SKIP: indicates that the node is a dry-run node. Dry-run nodes are started as scheduled but the system sets the status of the nodes to successful when it starts to run them.
BaselineId Long 1244564565

The ID of the baseline.

Repeatability Boolean true

Indicates whether the node can be rerun if the node fails to run. Valid values:

  • true: indicates that the node can be rerun.
  • false: indicates that the node cannot be rerun.
NodeName String test_Node

The name of the node.

ProjectId Long 12315412412

The ID of the workspace to which the node belongs.

ProgramType String ODPS_SQL

The type of the node.

Priority Integer 3

The priority of the node. Valid values: 1 to 8. A large value indicates a high priority.

OwnerId String 123124561341251321

The ID of the Alibaba Cloud account used by the node owner.

CronExpress String 00 00 * * * *

The cron expression. Cron expressions are used to run auto triggered nodes.

NodeId Long 1244564565

The ID of the node.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetNodeParents
&ProjectEnv=PROD
&NodeId=12345456211234
&Common request parameters

Sample success responses

XML format

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

<GetNodeParentsResponse>
    <HttpStatusCode>200</HttpStatusCode>
    <RequestId>asdfasdfas-adfasdf-asfas-dfasdf-asdf</RequestId>
    <ErrorMessage>err</ErrorMessage>
    <ErrorCode>1060010000000</ErrorCode>
    <Success>true</Success>
    <Data>
        <Nodes>
            <SchedulerType>NORMAL</SchedulerType>
            <BaselineId>1244564565</BaselineId>
            <Repeatability>true</Repeatability>
            <NodeName>test_Node</NodeName>
            <ProjectId>12315412412</ProjectId>
            <ProgramType>ODPS_SQL</ProgramType>
            <Priority>3</Priority>
            <OwnerId>123124561341251321</OwnerId>
            <CronExpress>00 00 * * * *</CronExpress>
            <NodeId>1244564565</NodeId>
        </Nodes>
    </Data>
</GetNodeParentsResponse>

JSON format

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

{
  "HttpStatusCode" : 200,
  "RequestId" : "asdfasdfas-adfasdf-asfas-dfasdf-asdf",
  "ErrorMessage" : "err",
  "ErrorCode" : 1060010000000,
  "Success" : true,
  "Data" : {
    "Nodes" : {
      "SchedulerType" : "NORMAL",
      "BaselineId" : 1244564565,
      "Repeatability" : true,
      "NodeName" : "test_Node",
      "ProjectId" : 12315412412,
      "ProgramType" : "ODPS_SQL",
      "Priority" : 3,
      "OwnerId" : 123124561341251330,
      "CronExpress" : "00 00 * * * *",
      "NodeId" : 1244564565
    }
  }
}

Error codes

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