You can call the ListFlowInstance 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-7A1018ADE917****

The ID of the project. You can call the ListFlowProject to view the ID of the project.

RegionId String Yes cn-hangzhou

The ID of the region. You can call the DescribeRegions operation to query the most recent region list.

Id String No None.

A reserved parameter.

FlowId String No F-1B4018ADE917****

The ID of the workflow. You can call the ListFlowInstance to view the workflow ID.

FlowName String No my_flow

The name of the workflow that you want to delete.

Owner String No 1230404****

The owner ID of the workflow instance.

InstanceId String No FI-7CAF9709CD32****

The ID of the workflow instance. You can call the ListFlowInstance to view the ID of the workflow instance.

NodeInstanceId String No FJI-54FEBB063136****

The ID of the job instance. You can call the DescribeFlowJob to view the job instance ID.

TimeRange String No {"type": "range", "from": 1608263168000, "to": 1608263169000}

The time range parameter to query. Parameter list:

  • type:range
  • from: start time (long)
  • to: end time (long)
StatusList.N RepeatList No RUNNING

Workflow status:

  • PREP: Preparing
  • RUNNING
  • SUCCEEDED
  • FAILED
  • KILLED: terminated
  • SUSPENDED: paused
OrderBy String No id

The field according to which workflow instances are ordered.

OrderType String No ASC

Sort direction:

  • ASC: in ascending order
  • DESC: in descending order
PageNumber Integer No 1

The number of the returned page.

PageSize Integer No 20

The page number of the returned page.

Response parameters

Parameter Type Example Description
FlowInstances Array of FlowInstance

The list of workflow instances.

FlowInstance
ClusterId String C-F32FB31D8295****

The ID of the cluster.

Duration Long 12000

The running duration. Unit: ms.

EndTime Long 1540796248000

The time when the execution of the workflow instance ended.

FlowId String F-35683D0E4573****

The ID of the workflow.

FlowName String flow-hive

The name of the workflow that you want to delete.

GmtCreate Long 1540796248000

The time when the accelerated domain name was added to Alibaba Cloud CDN.

GmtModified Long 1540796248000

The time when the scaling group was modified.

HasNodeFailed Boolean false

This parameter is unavailable.

Id String FI-7CAF9709CD32****

The ID of the workflow instance.

Owner String ****

The owner ID of the workflow instance.

ProjectId String FP-7A1018ADE917****

The ID of the project.

ScheduleTime Long 1554110977000

The time when the task was scheduled.

StartTime Long 1540796236000

The time when the execution of the workflow instance started.

Status String SUCCEEDED

Workflow status:

  • PREP: Preparing
  • RUNNING
  • SUCCEEDED
  • FAILED
  • KILLED: terminated
  • SUSPENDED: paused
PageNumber Integer 1

The number of the returned page.

PageSize Integer 20

The page number of the returned page.

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

The ID of the request.

Total Integer 42

The total number of returned entries.

Examples

Sample requests

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

Sample success responses

XML format

<FlowInstances>
    <FlowInstance>
        <Status>FAILED</Status>
        <FlowId>F-9C8D2BEC4D38****</FlowId>
        <Owner>125046002175****</Owner>
        <GmtCreate>1542963000000</GmtCreate>
        <EndTime>1542963033000</EndTime>
        <ClusterId>C-A6C9F4F1E9EC****</ClusterId>
        <FlowName>success+fail</FlowName>
        <StartTime>1542963001000</StartTime>
        <ProjectId>FP-17AB3389E1AD****</ProjectId>
        <GmtModified>1542963033000</GmtModified>
        <Duration>32000</Duration>
        <Id>FI-03F019530CB8****</Id>
    </FlowInstance>
    <FlowInstance>
        <Status>SUCCEEDED</Status>
        <FlowId>F-FECA99A4AE79****</FlowId>
        <Owner>20538903898346****</Owner>
        <GmtCreate>1542963000000</GmtCreate>
        <EndTime>1542963015000</EndTime>
        <ClusterId>C-A6C9F4F1E9EC****</ClusterId>
        <FlowName>success</FlowName>
        <StartTime>1542963000000</StartTime>
        <ProjectId>FP-17AB3389E1AD****</ProjectId>
        <GmtModified>1542963015000</GmtModified>
        <Duration>15000</Duration>
        <Id>FI-60B9DBFA5AD2****</Id>
    </FlowInstance>
</FlowInstances>
<PageSize>2</PageSize>
<RequestId>780BB15A-9038-4330-BE6C-0A47FE5A1BBF</RequestId>
<PageNumber>1</PageNumber>
<Total>50</Total>

JSON format

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