You can call this operation to query jobs.

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 ListFlowJob

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

ProjectId String Yes FP-257A173659F5****

The ID of the project.

RegionId String Yes cn-hangzhou

The ID of the region where your project resides.

Adhoc Boolean No false

Indicates whether the job is a temporary query job.

Id String No FJ-BCCAE48B90CCB37B

The ID of the job.

Name String No my_shell_job

The name of the job.

PageNumber Integer No 1

The number of the page to return.

PageSize Integer No 20

The number of entries to return on each page.

Type String No SHELL

The type of the job. Valid values: MR, SPARK, HIVE_SQL, HIVE, PIG, SQOOP, SPARK_SQL, SPARK_STREAMING, and SHELL.

Response parameters

Parameter Type Example Description
JobList

The list of jobs.

Job

The information of the job.

Adhoc String false

Indicates whether the job is a temporary query job.

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

The alert settings for the job instance.

CategoryId String FC-5BD9575E34623940

The directory ID of the job.

CustomVariables String "{\"scope\":\"PROJECT\",\"entityId\":\"FP-80C2FDDBF35D9CC5\",\"variables\":[{\"name\":\"v1\",\"value\":\"1\",\"properties\":{\"password\":true}}]}"

The custom variables configured for the job.

Description String This is the description of a job

The description of the job.

EnvConf String {"key":"value"}

The environment variables configured for the job.

FailAct String STOP

The action to take upon an operation failure of the node instance. Valid values:

  • CONTINUE: skips the node instance
  • STOP: stops the workflow instance
GmtCreate Long 1538017814000

The creation time of the job.

GmtModified Long 1538017814000

The modification time of the job.

Id String FJ-BCCAE48B90CCB37B

The ID of the job.

LastInstanceDetail String ""

This parameter is unavailable.

MaxRetry Integer 5

The maximum number of retries of running the node instance when a failure occurs.

MonitorConf String {"inputs":[{"type":"KAFKA","clusterId":"C-1234567","topics":"kafka_topic","consumer.group":"kafka_consumer_group"}],"outputs":[{"type":"KAFKA","clusterId":"C-1234567","topics":"kafka_topic"}]}

The monitoring configurations of the job. This parameter only applies to SPARK_STREAMING jobs.

Name String my_shell_job

The name of the job.

ParamConf String {"date":"${yyyy-MM-dd}"}

The configuration parameters of the job.

Params String ls -l

The content of the job.

ResourceList

The resources configured for the job.

Resource

The resource configured for the job.

Alias String demo.jar

The alias of the resource.

Path String oss://path/demo.jar

The storage path of the resource.

RetryInterval Long 200

The interval between successive retries of running the node instance. Valid values: 0 to 300. Unit: seconds.

RunConf String {"priority":1,"userName":"hadoop","memory":2048,"cores":1}

The scheduling parameters configured for the job.

Type String SHELL

The type of the job. Valid values: MR, SPARK, HIVE_SQL, HIVE, PIG, SQOOP, SPARK_SQL, SPARK_STREAMING, and SHELL.

mode String YARN

The submission mode of the job. Valid values: YARN and LOCAL.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 20

The number of entries returned per page.

RequestId String 7D2B1B2E-8D89-49C1-8D31-097C83879D20

The ID of the request.

Total Integer 11

The total number of entries returned.

Examples

Sample requests


http(s)://[Endpoint]/? Action=ListFlowJob
&ProjectId=FP-257A173659F5****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<ListFlowJobResponse>
  <PageSize>2</PageSize>
	  <RequestId>B83F5335-C8BF-47E9-9DE2-AC1C5E1B3D39</RequestId>
	  <PageNumber>1</PageNumber>
	  <Total>6</Total>
	  <JobList>
		    <Job>
			      <FailAct>STOP</FailAct>
			      <CategoryId>FC-BF013F34DE395AFC</CategoryId>
			      <Description>success</Description>
			      <GmtModified>1542957519000</GmtModified>
			      <Params>
				sleep 10;
			exit 0;</Params>
			      <MaxRetry>0</MaxRetry>
			      <Name>success</Name>
			      <ResourceList></ResourceList>
			      <Type>SHELL</Type>
			      <GmtCreate>1542957478000</GmtCreate>
			      <Adhoc>false</Adhoc>
			      <RetryInterval>15</RetryInterval>
			      <Id>FJ-31BD66C7BC50****</Id>
		    </Job>
		    <Job>
			      <FailAct>STOP</FailAct>
			      <CategoryId>FC-54C10B119442DC0C</CategoryId>
			      <Description>fail</Description>
			      <GmtModified>1542958715000</GmtModified>
			      <Params>
				sleep 10;
			exit 1;</Params>
			      <MaxRetry>0</MaxRetry>
			      <Name>fail</Name>
			      <ResourceList></ResourceList>
			      <Type>SHELL</Type>
			      <GmtCreate>1542957560000</GmtCreate>
			      <Adhoc>false</Adhoc>
			      <RetryInterval>15</RetryInterval>
			      <Id>FJ-A200F16108CA****7</Id>
		    </Job>
	  </JobList>
	

</ListFlowJobResponse>

JSON format

{
	"PageNumber":1,
	"JobList":{
		"Job":[
			{
				"FailAct":"STOP",
				"Description":"success",
				"Type":"SHELL",
				"GmtCreate":1542957478000,
				"GmtModified":1542957519000,
				"Name":"success",
				"MaxRetry":0,
				"CategoryId":"FC-BF013F34DE395AFC",
				"RetryInterval":15,
				"ResourceList":{
					"Resource":[]
				},
				"Params":"sleep 10;\nexit 0;",
				"Id":"FJ-31BD66C7BC50****",
				"Adhoc":false
			},
			{
				"FailAct":"STOP",
				"Description":"fail",
				"Type":"SHELL",
				"GmtCreate":1542957560000,
				"GmtModified":1542958715000,
				"Name":"fail",
				"MaxRetry":0,
				"CategoryId":"FC-54C10B119442DC0C",
				"RetryInterval":15,
				"ResourceList":{
					"Resource":[]
				},
				"Params":"sleep 10;\nexit 1;",
				"Id":"FJ-A200F16108CA****",
				"Adhoc":false
			}
		]
	},
	"PageSize":2,
	"RequestId":"B83F5335-C8BF-47E9-9DE2-AC1C5E1B3D39",
	"Total":6
}

Error codes

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