You can call this operation to query workflow instances.

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 ListFlowInstance

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

ProjectId String Yes FP-7A1018ADE9179EE1

The ID of the project.

RegionId String Yes cn-hangzhou

The ID of the region where your project resides.

FlowId String No F-1B4018ADE9179EE1

The ID of the workflow.

FlowName String No my_flow

The name of the workflow.

Id String No x

This parameter is unavailable.

InstanceId String No FI-7CAF9709CD328EBE

The ID of the workflow instance.

OrderBy String No id

The field according to which workflow instances are ordered.

OrderType String No asc

The method according to which workflow instances are ordered. Valid values: ASC and DESC.

Owner String No 1230404****

The owner ID of the workflow instance.

PageNumber Integer No 1

The number of the page to return.

PageSize Integer No 20

The number of entries to return on each page.

StatusList.N RepeatList No RUNNING

The status of workflow instances.

TimeRange String No {"type":"date","date":"ALL"}

The time range for querying workflow instances.

Response parameters

Parameter Type Example Description
FlowInstances

The list of workflow instances.

FlowInstance

The information of the workflow instance.

ClusterId String C-F32FB31D82954C64

The ID of the cluster.

Duration Long 12000

The execution time of the workflow instance. Unit: milliseconds.

EndTime Long 1540796248000

The time when the execution of the workflow instance ended.

FlowId String F-35683D0E45734E34

The ID of the workflow.

FlowName String flow-hive

The name of the workflow.

GmtCreate Long 1540796248000

The creation time of the workflow.

GmtModified Long 1540796248000

The modification time of the workflow.

HasNodeFailed Boolean false

This parameter is unavailable.

Id String FI-7CAF9709CD328EBE

The ID of the workflow instance.

Owner String ****

The owner ID of the workflow instance.

ProjectId String FP-7A1018ADE9179EE1

The ID of the project.

StartTime Long 1540796236000

The time when the execution of the workflow instance started.

Status String SUCCEEDED

The status of the workflow instance. Valid values:

  • PREP: The workflow instance is being prepared.
  • RUNNING: The workflow instance is running.
  • SUCCEEDED: The workflow instance execution succeeded.
  • FAILED: The workflow instance execution failed.
  • Terminated: The workflow instance is terminated.
  • SUSPENDED: The workflow instance is suspended.
PageNumber Integer 1

The page number of the returned page.

PageSize Integer 20

The number of entries returned per page.

RequestId String EDF99BA3-F7AF-49B2-ABA1-36430A31F482

The ID of the request.

Total Integer 42

The total number of entries returned.

Examples

Sample requests


http(s)://[Endpoint]/? Action=ListFlowInstance
&ProjectId=FP-7A1018ADE9179EE1
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<ListFlowInstanceResponse>
{
    "FlowInstances": {
        "FlowInstance": [
            {
                "Status": "FAILED",
                "FlowId": "F-9C8D2BEC4D3803BC",
                "Owner": "1250460021754461",
                "GmtCreate": 1542963000000,
                "EndTime": 1542963033000,
                "ClusterId": "C-A6C9F4F1E9EC****",
                "FlowName": "success+fail",
                "StartTime": 1542963001000,
                "ProjectId": "FP-17AB3389E1AD9A34",
                "GmtModified": 1542963033000,
                "Duration": 32000,
                "Id": "FI-03F019530CB8****"
            },
            {
                "Status": "SUCCEEDED",
                "FlowId": "F-FECA99A4AE794199",
                "Owner": "205389038983463961",
                "GmtCreate": 1542963000000,
                "EndTime": 1542963015000,
                "ClusterId": "C-A6C9F4F1E9EC****",
                "FlowName": "success",
                "StartTime": 1542963000000,
                "ProjectId": "FP-17AB3389E1AD9A34",
                "GmtModified": 1542963015000,
                "Duration": 15000,
                "Id": "FI-60B9DBFA5AD2****"
            }
        ]
    },
    "PageSize": 2,
    "RequestId": "780BB15A-9038-4330-BE6C-0A47FE5A1BBF",
    "PageNumber": 1,
    "Total": 50
}
</ListFlowInstanceResponse>

JSON format

{
	"FlowInstances":{
		"FlowInstance":[
			{
				"Owner":"1250460021754461",
				"Status":"FAILED",
				"ClusterId":"C-A6C9F4F1E9EC****",
				"FlowName":"success+fail",
				"Duration":32000,
				"FlowId":"F-9C8D2BEC4D3803BC",
				"Id":"FI-03F019530CB8****",
				"EndTime":1542963033000,
				"StartTime":1542963001000,
				"GmtCreate":1542963000000,
				"GmtModified":1542963033000,
				"ProjectId":"FP-17AB3389E1AD9A34"
			},
			{
				"Owner":"205389038983463961",
				"Status":"SUCCEEDED",
				"ClusterId":"C-A6C9F4F1E9EC****",
				"FlowName":"success",
				"Duration":15000,
				"FlowId":"F-FECA99A4AE794199",
				"Id":"FI-60B9DBFA5AD2****",
				"EndTime":1542963015000,
				"StartTime":1542963000000,
				"GmtCreate":1542963000000,
				"GmtModified":1542963015000,
				"ProjectId":"FP-17AB3389E1AD9A34"
			}
		]
	},
	"PageNumber":1,
	"PageSize":2,
	"RequestId":"780BB15A-9038-4330-BE6C-0A47FE5A1BBF",
	"Total":50
}

Error codes

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