You can call this operation to view a list of the workflow instances.

Request parameters

Parameter Type Required Example Description
RegionId String Yes cn-hangzhou Region ID
ProjectId String Yes FP-3535FE0BE5224A47 The ID of the project.
FlowId String No F-1B4018ADE9179EE1 The ID of the workflow.
FlowName String No my_flow The name of the workflow.
Id String No FI-7CAF9709CD328EBE The ID of the workflow instance.
PageNumber Integer No 1 The page number to request.
PageSize Integer No 20 The number of records to show on each page.
StatusList.N RepeatList No RUNNING The list of status.

Response parameters

Name Type Example Description
RequestId String EDF99BA3-F7AF-49B2-ABA1-36430A31F482 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.
FlowInstances The list of workflow instances.
Id String FI-7CAF9709CD328EBE The ID of the workflow instance.
GmtCreate Long 1540796248000 The creation time.
GmtModified Long 1540796248000 The modification time.
FlowId String F-35683D0E45734E34 The ID of the workflow.
FlowName String flow-hive The name of the workflow.
ProjectId String FP-7A1018ADE9179EE1 The ID of the project.
Status String SUCCEEDED The status of the workflow instance. Valid values: PREP, RUNNING, SUCCEEDED, FAILED, KILLED, and SUSPENDED.
ClusterId String C-F32FB31D82954C64 The ID of the cluster.
StartTime Long 1540796236000 The time when the workflow instance starts running.
EndTime Long 1540796248000 The time when the workflow instance ends running.
Duration Long 12,000 The running duration. Unit: milliseconds.

Examples

  • Sample requests
    
    /? Action=ListFlowInstance
    &ProjectId=FP-7A1018ADE9179EE1
    &RegionId=cn-hangzhou 
    &FlowId=F-1B4018ADE9179EE1 
    &FlowName=my_flow
    &Id=FI-7CAF9709CD328EBE
    &PageNumber=1 
    &PageSize=20 
    &StatusList. 1=RUNNING
    &<Common request parameters>
  • Successful response examples
    JSON format
    {
    	"FlowInstances":{
    		"FlowInstance":[
    			{
    				"ClusterId":"C-A6C9F4F1E9EC88D9",
    				"Duration":32000,
    				"EndTime":1542963033000,
    				"FlowId":"F-9C8D2BEC4D3803BC",
    				"FlowName":"success+fail",
    				"GmtCreate":1542963000000,
    				"GmtModified":1542963033000,
    				"Id":"FI-03F019530CB8D327",
    				"Owner":"1250460021754461",
    				"ProjectId":"FP-17AB3389E1AD9A34",
    				"StartTime":1542963001000,
    				"Status":"FAILED"
    			},
    			{
    				"ClusterId":"C-A6C9F4F1E9EC88D9",
    				"Duration":15000,
    				"EndTime":1542963015000,
    				"FlowId":"F-FECA99A4AE794199",
    				"FlowName":"success",
    				"GmtCreate":1542963000000,
    				"GmtModified":1542963015000,
    				"Id":"FI-60B9DBFA5AD2432B",
    				"Owner":"205389038983463961",
    				"ProjectId":"FP-17AB3389E1AD9A34",
    				"StartTime":1542963000000,
    				"Status":"SUCCEEDED"
    			}
    		]
    	},
    	"PageNumber":1,
    	"PageSize":2,
    	"RequestId":"780BB15A-9038-4330-BE6C-0A47FE5A1BBF",
    	"Total":50
    }
  • Error response examples
    JSON format
    {
    	"code":"FLOW_API_FAILED",
    	"message":"Project does not exist [FP-117AB3389E1AD9A34]",
    	"requestId":"63D6A3AD-8060-4E31-A926-36F2A23888C0",
    	"successResponse":false
    }

Error codes

View error codes.