You can call this operation to query workflows.

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 ListFlow

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

RegionId String Yes cn-hangzhou

The ID of the region where your cluster resides.

ClusterId String No C-F32FB31D82954C64

The ID of the cluster.

Id String No F-A32FB31D82954C64

The ID of the workflow.

JobId String No FJ-F32FB31D82954C64

The ID of the job.

Name String No my_flow

The name of the workflow.

PageNumber Integer No 1

The number of the page to return.

PageSize Integer No 20

The number of entries to return on each page.

Periodic Boolean No true

Specifies whether to periodically schedule the workflow.

ProjectId String No FP-3535FE0BE5224A47

The ID of the project.

Status String No STOP_SCHEDULE

The scheduling status of the workflow. Valid values:

  • STOP_SCHEDULE: scheduling stopped
  • UNDER_SCHEDULE: under scheduling

Response parameters

Parameter Type Example Description
Flow

The list of workflows.

Flow

The information of the workflow.

AlertConf String "{\"items\":[{\"enable\":true,\"eventId\":\"EMR-210401001\",\"alertUserGroupIdList\":[\"AUG-52dabfbbca654b52aae05ac5acd9a0f0\"],\"alertDingDingGroupList\":[\"ADG-2c411c452e6b467b9a59fadf21d195ad\"]}]}"

The alert settings for the workflow instance.

AlertDingDingGroupBizId String N/A

This parameter is unavailable.

AlertUserGroupBizId String N/A

This parameter is unavailable.

CategoryId String FC-2CF58396A18923B6

The directory ID of the workflow.

ClusterId String C-F32FB31D82954C64

The ID of the cluster.

CreateCluster Boolean false

Indicates whether the cluster was created from the cluster template.

CronExpr String 0 0 0 * * ?

The CRON expression of the time-based scheduling of the workflow.

Description String my flow demo

The description of the workflow.

EndSchedule Long 4102416001000

The end time of the scheduling.

GmtCreate Long 1541561048000

The creation time of the workflow.

GmtModified Long 1542902401000

The modification time of the workflow.

Graph String {"nodes":[{"id":"48d474ea","index":0,"spmAnchorId":"0.0.0.i0.766645eb2cmNtQ","attribute":{"type":"START"},"shape":"startControlNode","type":"node","y":250,"size":"80*34","x":500},{"id":"7ba480b3","index":1,"spmAnchorId":"5176.8250060.0.i19.771e28d0IPNQGE","attribute":{"jobType":"SHELL","jobId":"FJ-7BE1062897B19D25","type":"JOB"},"config":{"hostName":""},"label":"fail_job","shape":"shellJobNode","type":"node","y":398.5,"size":"170*34","x":470.5},{"id":"33202d60","index":2,"spmAnchorId":"5176.8250060.0.i23.771e28d0IPNQGE","attribute":{"type":"END"},"shape":"endControlNode","type":"node","y":562.5,"size":"80*34","x":430.5}],"edges":[{"id":"28167ea0","index":3,"source":"48d474ea","sourceAnchor":0,"target":"7ba480b3","targetAnchor":0},{"id":"e8d5ff52","index":4,"source":"7ba480b3","sourceAnchor":1,"target":"33202d60","targetAnchor":0}]}

The information of the directed acyclic graph (DAG) of the workflow.

HostName String emr-header-1.cluster-123456

The name of the host that is specified for running the workflow instance. It is in the format of emr-header-1.cluster-123456.

Id String 7A39731FE7196358

The ID of the workflow.

Name String my_flow_demo

The name of the workflow.

Periodic Boolean true

Indicates whether the workflow is periodically scheduled.

ProjectId String FP-3535FE0BE5224A47

The ID of the project.

StartSchedule Long 1541561443000

The start time of the scheduling of the workflow.

Status String UNDER_SCHEDULE

The scheduling status of the workflow. Valid values: STOP_SCHEDULE and UNDER_SCHEDULE.

Type String EMR

The type of the workflow. Valid value: EMR.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 20

The number of entries returned per page.

RequestId String 7DDFF4C7-3AE3-485F-BFA1-BAE0AA3689DD

The ID of the request.

Total Integer 1

The total number of entries returned.

Examples

Sample requests


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

Sample success responses

XML format

<ListFlowResponse>
  <PageSize>500</PageSize>
	  <RequestId>7DDFF4C7-3AE3-485F-BFA1-BAE0AA3689DD</RequestId>
	  <PageNumber>1</PageNumber>
	  <Total>1</Total>
	  <Flow>
		    <Flow>
			      <StartSchedule>1541561443000</StartSchedule>
			      <Status>UNDER_SCHEDULE</Status>
			      <CategoryId>FC-2CF58396A18923B6</CategoryId>
			      <Description>daily_0</Description>
			      <ClusterId>C-F32FB31D8295****</ClusterId>
			      <GmtModified>1542902401000</GmtModified>
			      <ProjectId>FP-3535FE0BE5224A47</ProjectId>
			      <Periodic>true</Periodic>
			      <CronExpr>0 0 0 * * ? </CronExpr>
			      <Name>daily_0</Name>
			      <Type>EMR</Type>
			      <GmtCreate>1541561048000</GmtCreate>
			      <Id>F-D156B45E06F1****</Id>
			      <EndSchedule>4102416001000</EndSchedule>
			      <HostName></HostName>
			      <CreateCluster>false</CreateCluster>
		    </Flow>
	  </Flow>
	

</ListFlowResponse>

JSON format

{
	"Flow":{
		"Flow":[
			{
				"Description":"daily_0",
				"Type":"EMR",
				"CreateCluster":false,
				"CronExpr":"0 0 0 * * ?",
				"GmtCreate":1541561048000,
				"GmtModified":1542902401000,
				"HostName":"",
				"StartSchedule":1541561443000,
				"Name":"daily_0",
				"EndSchedule":4102416001000,
				"Status":"UNDER_SCHEDULE",
				"CategoryId":"FC-2CF58396A18923B6",
				"ClusterId":"C-F32FB31D8295****",
				"Periodic":true,
				"Id":"F-D156B45E06F1****",
				"ProjectId":"FP-3535FE0BE5224A47"
			}
		]
	},
	"PageNumber":1,
	"PageSize":500,
	"RequestId":"7DDFF4C7-3AE3-485F-BFA1-BAE0AA3689DD",
	"Total":1
}

Error codes

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