You can call this operation to view a list of jobs.

Request parameters

Parameter Type Required Example Description
RegionId String Yes cn-hangzhou The ID of the region.
ProjectId String Yes FP-257A173659F59685 The ID of the project.
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 page number to request.
PageSize Integer No 20 The number of records to show 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

Name Type Example Description
RequestId String 7D2B1B2E-8D89-49C1-8D31-097C83879D20 The ID of the request.
PageNumber Integer 1 The page number to request.
PageSize Integer 20 The number of records to show on each page.
Total Integer 42 The total number of records.
JobList The list of jobs.
Id String FJ-BCCAE48B90CCB37B The ID of the job.
GmtCreate Long 1540796248000 The creation time.
GmtModified Long 1540796248000 The modification time.
Name String my_shell_job The name of 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.
Description String "This is a job description." The description
FailAct String STOP The action to take after failure. Valid values: STOP and CONTINUE.
MaxRetry Integer 5 The maximum number of retries.
RetryInterval Long 200 The interval between retries. Valid values: 0 to 300. Unit: seconds.
Params String ls -l The content of the job.
ParamConf String {"date":"${yyyy-MM-dd}"} The configurations of the parameters.
EnvConf String {"key":"value"} The configurations of the environment variables.
RunConf String {"priority":1,"userName":"hadoop","memory":2048,"cores":1} The run configurations.
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. Only jobs of the SPARK_STREAMING type are supported.
CategoryId String FC-5BD9575E34623940 The ID of the category.
mode String YARN The mode of the model. Valid values: YARN and LOCAL.
ResourceList The list of the resources.
Path String oss://path/demo.jar The path of the resource.
Alias String demo.jar The alias of the resource.

Examples

  • Sample requests
    
    /? Action=ListFlowJob
    &ProjectId=FP-257A173659F59685
    &RegionId=cn-hangzhou
    &Id=FJ-BCCAE48B90CCB37B
    &Name=my_shell_job
    &PageNumber=1
    &PageSize=20
    &Type=SHELL
    &<Common request parameters>
  • Successful response examples
    JSON format
    {
    	"JobList":{
    		"Job":[
    			{
    				"Adhoc":false,
    				"CategoryId":"FC-BF013F34DE395AFC",
    				"Description":"success",
    				"FailAct":"STOP",
    				"GmtCreate":1542957478000,
    				"GmtModified":1542957519000,
    				"Id":"FJ-31BD66C7BC502815",
    				"MaxRetry":0,
    				"Name":"success",
    				"Params":"sleep 10;\nexit 0;",
    				"ResourceList":{
    					"Resource":[]
    				},
    				"RetryInterval":15,
    				"Type":"SHELL"
    			},
    			{
    				"Adhoc":false,
    				"CategoryId":"FC-54C10B119442DC0C",
    				"Description":"fail",
    				"FailAct":"STOP",
    				"GmtCreate":1542957560000,
    				"GmtModified":1542958715000,
    				"Id":"FJ-A200F16108CA9047",
    				"MaxRetry":0,
    				"Name":"fail",
    				"Params":"sleep 10;\nexit 1;",
    				"ResourceList":{
    					"Resource":[]
    				},
    				"RetryInterval":15,
    				"Type":"SHELL"
    			}
    		]
    	},
    	"PageNumber":1,
    	"PageSize":2,
    	"RequestId":"B83F5335-C8BF-47E9-9DE2-AC1C5E1B3D39",
    	"Total":6
    }
  • Error response examples
    JSON format
    {
    	"code":"FLOW_API_FAILED",
    	"message":"Project does not exist [FP-17AB3389E1AD9A3]",
    	"requestId":"73DE8742-4D15-4C95-81EA-3F5D1C7738BC",
    	"successResponse":false
    }

Error codes

View error codes.