Call ListFlowInstance to query the list of 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 Position Type Required Example Description
Action Query String Yes ListFlowInstance

The operation that you want to perform. For API requests using the HTTP or HTTPS URL, this parameter is required. Set the value to ListFlowInstance.

ProjectId Query String Yes FP-7A1018ADE917****

The ID of the project.

RegionId Query String Yes cn-hangzhou

The region ID of the instance.

Id Query String No -

A deprecated parameter.

FlowId Query String No F-1B4018ADE917****

The ID of the workflow.

FlowName Query String No my_flow

The name of the workflow.

Owner Query String No 1230404****

The owner ID of the workflow instance.

InstanceId Query String No FI-7CAF9709CD32****

The ID of the workflow instance.

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

The time range for querying workflow instances.

StatusList.N Query RepeatList No RUNNING

The status of the job 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.
OrderBy Query String No id

The field according to which workflow instances are ordered.

OrderType Query String No asc

Sorting direction:

  • ASC
  • DESC
PageNumber Query Integer No 1

The page number of the page to be returned.

PageSize Query Integer Optional 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 HPC cluster.

Duration Long 12000

Run duration, in 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 live domain was created.

GmtModified Long 1540796248000

The time when the instance launch template 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: 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 page to be returned.

PageSize Integer 20

The page number of the returned page.

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

The ID of the instance.

Total Interger 42

The total number of entries returned.

Examples

Sample request

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
}

Error codes

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