You can call this operation to query a workflow.

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 DescribeFlow

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

Id String Yes F-7A39731FE7196358

The ID of the workflow.

ProjectId String Yes FP-257A173659F59685

The ID of the project.

RegionId String Yes cn-hangzhou

The ID of the region where your project resides.

Response parameters

Parameter Type Example Description
AlertConf String {"items":[{"enable":true,"eventId":"EMR-210401001","alertUserGroupIdList":["AUG-b79bb29bb6e14ddd89674a242623851b"],"alertDingDingGroupList":["ADG-af1f9689d6194e2dbd89927d5c515172"]},{"enable":true,"eventId":"EMR-110401015","alertUserGroupIdList":["AUG-b79bb29bb6e14ddd89674a242623851b"],"alertDingDingGroupList":["ADG-af1f9689d6194e2dbd89927d5c515172"]},{"enable":true,"eventId":"EMR-110401002","alertUserGroupIdList":["AUG-b79bb29bb6e14ddd89674a242623851b"],"alertDingDingGroupList":["ADG-af1f9689d6194e2dbd89927d5c515172"]}]}

The alert settings for the workflow instance. Valid values of eventId:

  • EMR-210401001: indicates that the workflow instance execution failed.
  • EMR-110401002: indicates that the workflow instance execution succeeded.
  • EMR-110401015: indicates that a node instance failed.
AlertDingDingGroupBizId String AUG-c917bbfaf6494bbfacdee69c8284967c

The ID of the DingTalk group to which alerts are sent.

AlertUserGroupBizId String ADG-0a00d00abb7743ff9f812f1a997f3d87

The ID of the user group to which alerts are sent.

Application String {"nodeDefMap":{":start:":{"name":":start:","type":":start:","transitions":["cluster"]},"cluster":{"id":"CT-0C74281682CF03B4","name":"cluster","type":":Cluster:","transitions":["job1"]},"job1":{"jobId":"FJ-242AB240DBAF4195","name":"job1","type":":action:","transitions":["end"]},"end":{"name":"end","type":":end:"}}}

The structure of the workflow, represented by nodeDefMap. The nodeDefMap consists of a group of nodes.

type: the type of the current node.

  • A value of :start: indicates the start node.
  • A value of :Cluster: indicates the cluster node.
  • A value of :action: indicates the action node.
  • A value of :end: indicates the end node.
  • transitions: the downstream nodes of the current node. Separate each node with a comma (,).
CategoryId String FC-F2495319DA05CEE5

The directory ID of the workflow.

ClusterId String C-A23BD131A862F184

The ID of the target cluster or cluster template.

CreateCluster Boolean false

Indicates whether the cluster was created from the cluster template.

  • If this parameter is set to true, the ID of the cluster is in the format of a cluster template ID: CT-XXXXXX.
  • If this parameter is set to false, the ID of the cluster is in the format of a cluster ID: C- XXXXXX.
CronExpr String 0 0 0-23/1 * * ?

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

Description String This is the description of a workflow

The description of the workflow.

EndSchedule Long 1538018814000

The end time of the scheduling.

GmtCreate Long 1538017814000

The creation time of the workflow.

GmtModified Long 1538017814000

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. The format is emr-header-1.cluster-123456.

Id String F-7A39731FE7196358

The ID of the workflow.

Name String my_flow_demo

The name of the workflow.

ParentFlowList

The parent workflows of the queried workflow.

ParentFlow

The information of the parent workflow.

ParentFlowId String F-123456

The ID of the parent workflow.

ParentFlowName String parent_flow

The name of the parent workflow.

ProjectId String FP-257A173659F59685

The ID of the project.

ProjectName String my_project

The name of the project.

Periodic Boolean true

Indicates whether the workflow is periodically scheduled.

RequestId String 243D5A48-96A5-4C0C-8966-93CBF65635ED

The ID of the request.

StartSchedule Long 1538017814000

The start time of the scheduling.

Status String STOP_SCHEDULE

The scheduling status of the workflow. Valid values:

  • STOP_SCHEDULE
  • UNDER_SCHEDULE
Type String EMR

The type of the workflow. Valid value: EMR.

Examples

Sample requests


http(s)://[Endpoint]/? Action=DescribeFlow
&Id=F-7A39731FE7196358
&ProjectId=FP-257A173659F59685
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<DescribeFlowResponse>
  <alertUserGroupBizId></alertUserGroupBizId>
	  <Description>flow</Description>
	  <Type>EMR</Type>
	  <CreateCluster>false</CreateCluster>
	  <GmtCreate>1533294723000</GmtCreate>
	  <GmtModified>1535449545000</GmtModified>
	  <HostName></HostName>
	  <Name>flow</Name>
	  <Status>STOP_SCHEDULE</Status>
	  <ParentFlowList></ParentFlowList>
	  <CategoryId>FC-020BA6E39BF0DF35</CategoryId>
	  <alertDingDingGroupBizId></alertDingDingGroupBizId>
	  <ClusterId>C-23D6879E9BBE****</ClusterId>
	  <Periodic>false</Periodic>
	  <RequestId>E909BE04-1989-4751-93E6-1327FFC71EC0</RequestId>
	  <Graph>
		    <edges>
			      <id>af91f6b1</id>
			      <index>2</index>
			      <sourceAnchor>0</sourceAnchor>
			      <source>48d474ea</source>
			      <target>f2764af5</target>
			      <targetAnchor>0</targetAnchor>
		    </edges>
		    <edges>
			      <id>3022d5b9</id>
			      <index>4</index>
			      <source>48d474ea</source>
			      <sourceAnchor>0</sourceAnchor>
			      <target>ee4ee659</target>
			      <targetAnchor>0</targetAnchor>
		    </edges>
		    <edges>
			      <id>cfa94eec</id>
			      <index>6</index>
			      <source>f2764af5</source>
			      <sourceAnchor>1</sourceAnchor>
			      <target>75ba7979</target>
			      <targetAnchor>0</targetAnchor>
		    </edges>
		    <edges>
			      <id>00cd608a</id>
			      <index>7</index>
			      <source>ee4ee659</source>
			      <sourceAnchor>1</sourceAnchor>
			      <target>75ba7979</target>
			      <targetAnchor>0</targetAnchor>
		    </edges>
		    <edges>
			      <id>c53a4788</id>
			      <index>9</index>
			      <source>75ba7979</source>
			      <sourceAnchor>1</sourceAnchor>
			      <target>ea5b3e8f</target>
			      <targetAnchor>0</targetAnchor>
		    </edges>
		    <nodes>
			      <id>f2764af5</id>
			      <index>0</index>
			      <spmAnchorId>5176.8250060.0.i158.771e28d0IPNQGE</spmAnchorId>
			      <config>
				        <clusterId>C-E2544BF48603****</clusterId>
			      </config>
			      <attribute>
				        <jobType>SHELL</jobType>
				        <jobId>FJ-D9595F5B79ADBAD4</jobId>
				        <type>JOB</type>
			      </attribute>
			      <label>echo</label>
			      <shape>shellJobNode</shape>
			      <type>node</type>
			      <y>394.5</y>
			      <x>321.25</x>
			      <size>170*34</size>
		    </nodes>
		    <nodes>
			      <id>48d474ea</id>
			      <index>1</index>
			      <spmAnchorId>0.0.0.i0.766645eb2cmNtQ</spmAnchorId>
			      <attribute>
				        <type>START</type>
			      </attribute>
			      <shape>startControlNode</shape>
			      <type>node</type>
			      <y>262</y>
			      <size>80*34</size>
			      <x>500</x>
		    </nodes>
		    <nodes>
			      <id>ee4ee659</id>
			      <index>3</index>
			      <spmAnchorId>5176.8250060.0.i11.6bb528d0eMBmZQ</spmAnchorId>
			      <attribute>
				        <jobType>SHELL</jobType>
				        <jobId>FJ-7BE1062897B19D25</jobId>
				        <type>JOB</type>
			      </attribute>
			      <config>
				        <hostName></hostName>
			      </config>
			      <label>fail_job</label>
			      <shape>shellJobNode</shape>
			      <type>node</type>
			      <y>456.5</y>
			      <size>170*34</size>
			      <x>518.125</x>
		    </nodes>
		    <nodes>
			      <id>75ba7979</id>
			      <index>5</index>
			      <spmAnchorId>5176.8250060.0.i11.6bb528d0eMBmZQ</spmAnchorId>
			      <attribute>
				        <jobType>SHELL</jobType>
				        <jobId>FJ-D9595F5B79ADBAD4</jobId>
				        <type>JOB</type>
			      </attribute>
			      <config>
				        <hostName>emr-header-1.cluster-71886</hostName>
				        <clusterId>C-7CE7BC10276E24BE</clusterId>
			      </config>
			      <label>echo</label>
			      <shape>shellJobNode</shape>
			      <type>node</type>
			      <y>585.5</y>
			      <size>170*34</size>
			      <x>250.125</x>
		    </nodes>
		    <nodes>
			      <id>ea5b3e8f</id>
			      <index>8</index>
			      <spmAnchorId>5176.8250060.0.i19.6bb528d0eMBmZQ</spmAnchorId>
			      <attribute>
				        <type>END</type>
			      </attribute>
			      <shape>endControlNode</shape>
			      <type>node</type>
			      <y>700.5</y>
			      <size>80*34</size>
			      <x>239.125</x>
		    </nodes>
	  </Graph>
	  <Id>F-7A39731FE7196358</Id>
</DescribeFlowResponse>

JSON format

{
	"alertUserGroupBizId":"",
	"Description":"flow",
	"Type":"EMR",
	"CreateCluster":false,
	"GmtCreate":1533294723000,
	"GmtModified":1535449545000,
	"HostName":"",
	"Name":"flow",
	"Status":"STOP_SCHEDULE",
	"ParentFlowList":{
		"ParentFlow":[]
	},
	"CategoryId":"FC-020BA6E39BF0DF35",
	"alertDingDingGroupBizId":"",
	"ClusterId":"C-23D6879E9BBE****",
	"Periodic":false,
	"RequestId":"E909BE04-1989-4751-93E6-1327FFC71EC0",
	"Graph":{
		"edges":[
			{
				"id":"af91f6b1",
				"index":2,
				"source":"48d474ea",
				"sourceAnchor":0,
				"target":"f2764af5",
				"targetAnchor":0
			},
			{
				"id":"3022d5b9",
				"index":4,
				"sourceAnchor":0,
				"source":"48d474ea",
				"target":"ee4ee659",
				"targetAnchor":0
			},
			{
				"id":"cfa94eec",
				"index":6,
				"sourceAnchor":1,
				"source":"f2764af5",
				"target":"75ba7979",
				"targetAnchor":0
			},
			{
				"id":"00cd608a",
				"index":7,
				"sourceAnchor":1,
				"source":"ee4ee659",
				"target":"75ba7979",
				"targetAnchor":0
			},
			{
				"id":"c53a4788",
				"index":9,
				"sourceAnchor":1,
				"source":"75ba7979",
				"target":"ea5b3e8f",
				"targetAnchor":0
			}
		],
		"nodes":[
			{
				"id":"f2764af5",
				"index":0,
				"spmAnchorId":"5176.8250060.0.i158.771e28d0IPNQGE",
				"attribute":{
					"jobType":"SHELL",
					"jobId":"FJ-D9595F5B79ADBAD4",
					"type":"JOB"
				},
				"config":{
					"clusterId":"C-E2544BF48603****"
				},
				"label":"echo",
				"shape":"shellJobNode",
				"type":"node",
				"y":394.5,
				"size":"170*34",
				"x":321.25
			},
			{
				"id":"48d474ea",
				"index":1,
				"spmAnchorId":"0.0.0.i0.766645eb2cmNtQ",
				"attribute":{
					"type":"START"
				},
				"shape":"startControlNode",
				"type":"node",
				"y":262,
				"x":500,
				"size":"80*34"
			},
			{
				"id":"ee4ee659",
				"index":3,
				"spmAnchorId":"5176.8250060.0.i11.6bb528d0eMBmZQ",
				"config":{
					"hostName":""
				},
				"attribute":{
					"jobType":"SHELL",
					"jobId":"FJ-7BE1062897B19D25",
					"type":"JOB"
				},
				"label":"fail_job",
				"shape":"shellJobNode",
				"type":"node",
				"y":456.5,
				"x":518.125,
				"size":"170*34"
			},
			{
				"id":"75ba7979",
				"index":5,
				"spmAnchorId":"5176.8250060.0.i11.6bb528d0eMBmZQ",
				"config":{
					"hostName":"emr-header-1.cluster-71886",
					"clusterId":"C-7CE7BC10276E24BE"
				},
				"attribute":{
					"jobType":"SHELL",
					"jobId":"FJ-D9595F5B79ADBAD4",
					"type":"JOB"
				},
				"label":"echo",
				"shape":"shellJobNode",
				"type":"node",
				"y":585.5,
				"x":250.125,
				"size":"170*34"
			},
			{
				"id":"ea5b3e8f",
				"index":8,
				"spmAnchorId":"5176.8250060.0.i19.6bb528d0eMBmZQ",
				"attribute":{
					"type":"END"
				},
				"shape":"endControlNode",
				"type":"node",
				"y":700.5,
				"x":239.125,
				"size":"80*34"
			}
		]
	},
	"Id":"F-7A39731FE7196358"
}

Error codes

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