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. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK sample code.

Request parameters

Parameter Type Required Example Description
Action String Yes ListFlowInstance

The operation that you want to perform. This parameter is required for API requests that you create by piecing together HTTP or HTTPS URLs. Set the value to ListFlowInstance.

ProjectId String Yes FP-7A1018ADE917****

The ID of the project. You can call ListFlowProject View the ID of the project.

RegionId String Yes cn-hangzhou

The region ID of the instance. You can call DescribeRegions To view the latest list of Alibaba Cloud regions.

Id String No N/A

A reserved parameter.

FlowId String No F-1B4018ADE917****

The ID of the workflow. You can call ListFlowInstance View the workflow ID.

FlowName String No my_flow

The name of the workflow.

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 ListFlowInstance View the ID of the workflow instance.

NodeInstanceId String No FJI-54FEBB063136****

The ID of the ECS instance that is added to the ACK cluster.

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

The time range parameter for the query. List of parameters:

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

The status of the job instance. Valid values:

  • PREP (preparing)
  • RUNNING
  • SUCCEEDED
  • FAILED (FAILED)
  • KILLED (terminated)
  • SUSPENDED
OrderBy String No id

The field according to which workflow instances are ordered.

OrderType String No ASC

Sort direction:

  • ASC: Ascending order
  • DESC: descending order
PageNumber Integer No 1

The page 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

Running duration, in units 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.

GmtCreate Long 1540796248000

The time when the accelerated domain name was created.

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

The status of the workflow instance. Valid values:

  • PREP (preparing)
  • RUNNING
  • SUCCEEDED
  • FAILED (FAILED)
  • KILLED (terminated)
  • SUSPENDED
PageNumber Integer 1

The page 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 Syntax

{
    "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
}