You can call this operation to query workflow node instances.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Example Description
Action String Yes ListFlowNodeInstance

The operation that you want to perform. Set this parameter to ListFlowNodeInstance.

RegionId String Yes cn-hangzhou

The ID of the region.

OrderBy String No start_time

The sort field.

OrderType String No desc

The sort direction.

PageNumber Integer No 1

The number of the page to return.

PageSize Integer No 20

The number of entries to return on each page.

ProjectId String No FP-257A173659F5****

The ID of the project.

StartTime Long No 1540796248000

The beginning of the time range where workflow node instances are queried.

StatusList.N RepeatList No FAILED

The status list of workflow node instances.

Response parameters

Parameter Type Example Description
FlowNodeInstances

The list of workflow node instances.

ClusterId String C-A6C9F4F1E9E****

The ID of the cluster.

Duration Long 200

The running duration, in milliseconds.

EndTime Long 1540796248000

The time when the workflow node instance stopped.

ExternalChildIds String application_1541559535023_34028

The application list of the tasks of the job.

ExternalId String application_1541559535023_34027

The application ID of the launcher.

ExternalInfo String empty

The external information, such as error diagnosis information of job running.

ExternalStatus String SUCCESS

The external status. Valid values:

  • SUBMITTED: submitted
  • RUNNING: running
  • SUCCESS: execution succeeded
  • FAIL: execution failed
  • KILL_FAIL: termination failed
  • KILL_SUCCESS: termination succeeded
ExternalSubId String container_1541559535023_34027_01_000001

The container ID of the launcher.

FailAct String STOP

The action to take when the workflow node instance failed. Valid values:

  • STOP: Terminate the workflow.
  • CONTINUE: Skip the failed workflow node instance.
FlowId String F-35683D0E45734E34

The ID of the workflow.

FlowInstanceId String FI-7CAF9709CD328EBE

The ID of the workflow instance.

GmtCreate Long 1540796236000

The time when the workflow node instance was created.

GmtModified Long 1540796247000

The time when the workflow node instance was modified.

HostName String emr-header-1.cluster-12345

The name of the host where the workflow node instance is running. The host can be a master node or gateway node. The format of the hostname is emr-header-1.cluster-12345. You can log on to the host and run the hostname command to check the hostname.

Id String FNI-9D14A7CCF2687B84

The ID of the workflow node instance.

JobId String FJ-A23BD131A862F184

The ID of the job.

JobName String myJob

The name of the job.

JobParams String ls -l

The content of the job.

JobType String HIVE_SQL

The type of the job.

MaxRetry String 0

The maximum number of times the job can be retried.

NodeName String node

The name of the node.

Pending Boolean false

Indicates whether the workflow node instance was completed.

ProjectId String FP-7A1018ADE917****

The ID of the project.

Retries Integer 0

The consecutive number of times the job has been retried.

RetryInterval String 200

The retry interval, in milliseconds.

StartTime Long 1540796237000

The time when the job started.

Status String OK

The status of the job. Valid values: PREP (waiting for running), SUBMITTING (being submitted), RUNNING (running), DONE (completed), OK (execution succeeded), FAILED (execution failed), KILLED (terminated), KILL_FAILED (termination failed), and START_RETRY (retry started).

Type String JOB

The type of the node.

PageNumber Integer 1

The number of the page returned.

PageSize Integer 20

The number of entries returned on each page.

RequestId String 83B256D4-4E95-454B-AD08-799DF31D5556

The ID of the request.

Total Integer 12

The total number of instances.

Examples

Sample request


http(s)://[Endpoint]/? Action=ListFlowNodeInstance
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success response

XML format

<ListFlowNodeInstanceResponse>
  <PageSize>10</PageSize>
	  <RequestId>BCF52B64-007F-4883-BAEA-0499106D07C2</RequestId>
	  <PageNumber>1</PageNumber>
	  <Total>1</Total>
	  <NodeInstances>
		    <NodeInstance>
			      <FailAct>STOP</FailAct>
			      <Status>OK</Status>
			      <EndTime>1542957514000</EndTime>
			      <ClusterId>C-A6C9F4F1E9EC****</ClusterId>
			      <ExternalId>application_1542955685866_0003</ExternalId>
			      <pending>false</pending>
			      <JobName>success</JobName>
			      <GmtModified>1542957514000</GmtModified>
			      <StartTime>1542957499000</StartTime>
			      <ProjectId>FP-17AB3389E1AD9A34</ProjectId>
			      <MaxRetry>0</MaxRetry>
			      <ParamConf>{"cyctime":"2018-11-23 15:18:19"}</ParamConf>
			      <ExternalStatus>SUCCESS</ExternalStatus>
			      <GmtCreate>1542957499000</GmtCreate>
			      <JobType>SHELL</JobType>
			      <ExternalInfo></ExternalInfo>
			      <Retries>0</Retries>
			      <RetryInterval>0</RetryInterval>
			      <Id>FJI-F4FC53D7207E4BEF</Id>
			      <HostName>emr-header-2.cluster-500160670</HostName>
			      <JobId>FJ-31BD66C7BC502815</JobId>
		    </NodeInstance>
	  </NodeInstances>
	</ListFlowNodeInstanceResponse>

JSON format

{
	"PageNumber":1,
	"PageSize":10,
	"NodeInstances":{
		"NodeInstance":[
			{
				"FailAct":"STOP",
				"Retries":0,
				"ExternalId":"application_1542955685866_0003",
				"JobName":"success",
				"GmtCreate":1542957499000,
				"GmtModified":1542957514000,
				"HostName":"emr-header-2.cluster-500160670",
				"JobType":"SHELL",
				"Status":"OK",
				"MaxRetry":0,
				"RetryInterval":0,
				"ClusterId":"C-A6C9F4F1E9EC****",
				"JobId":"FJ-31BD66C7BC502815",
				"pending":false,
				"ParamConf":"{\"cyctime\":\"2018-11-23 15:18:19\"}",
				"Id":"FJI-F4FC53D7207E4BEF",
				"EndTime":1542957514000,
				"ExternalInfo":"",
				"StartTime":1542957499000,
				"ExternalStatus":"SUCCESS",
				"ProjectId":"FP-17AB3389E1AD9A34"
			}
		]
	},
	"RequestId":"BCF52B64-007F-4883-BAEA-0499106D07C2",
	"Total":1
}

Error codes

For more information about error codes, see API Error Center.