Call the ListFlow operation to query the list of workflows.

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 ListFlow

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

RegionId String Yes cn-hangzhou

The ID of the region to which the cluster belongs.

ProjectId String No FP-3535FE0BE522****

The ID of the project.

JobId String No FJ-F32FB31D8295****

The ID of the job.

Name String No my_flow

The name of the workflow.

Id String No F-A32FB31D8295****

The ID of the workflow.

ClusterId String No C-F32FB31D8295****

The ID of the cluster.

Status String No STOP_SCHEDULE

The scheduling status of the workflow. Valid values:

  • STOP_SCHEDULE (stop scheduling)
  • UNDER_SCHEDULE (in scheduling)
Periodic Boolean No true

Specifies whether to periodically schedule the workflow.

PageNumber Integer No 1

The page number of the page returned.

PageSize Integer No 20

The number of entries to return on each page.

Response parameters

Parameter Type Example Description
Flow Array

The list of workflows.

Flow
AlertConf String "{\"items\":[{\"enable\":true,\"eventId\":\"EMR-210401001\",\"alertUserGroupIdList\":[\"AUG-52dabfbbca654b52aae05ac5acd9a0f0\"],\"alertDingDingGroupList\":[\"ADG-2c411c452e6b467b9a59fadf21d195ad\"]}]}"

The alert settings for the workflow instance.

AlertDingDingGroupBizId String N/A

This parameter is unavailable.

AlertUserGroupBizId String N/A

This parameter is unavailable.

CategoryId String FC-2CF58396A189 automatic snapshot policies *

The directory ID of the workflow.

ClusterId String C-F32FB31D8295****

The ID of the cluster.

CreateCluster Boolean false

Indicates whether the cluster was created from the cluster template.

CronExpr String 0 0 0 * * ?

The CRON expression of the time-based scheduling of the workflow.

Description String my flow demo

The description of the workflow.

EndSchedule Long 4102416001000

The end time of the scheduling.

GmtCreate Long 1541561048000

The creation time of the workflow.

GmtModified Long 1542902401000

The modification time of the workflow.

Graph String {"nodes":[{"id":"48d474ea","index":0,"spmAnchorId":"0.0.0.i0.766645eb2cmNtQ","attribute":{"type":"START"},"shape":"startControlNode","type":"node","y":250,"size":"80*34","x":500},{"id":"7ba480b3","index":1,"spmAnchorId":"5176.8250060.0.i19.771e28d0IPNQGE","attribute":{"jobType":"SHELL","jobId":"FJ-7BE1062897B19D25","type":"JOB"},"config":{"hostName":""},"label":"fail_job","shape":"shellJobNode","type":"node","y":398.5,"size":"170*34","x":470.5},{"id":"33202d60","index":2,"spmAnchorId":"5176.8250060.0.i23.771e28d0IPNQGE","attribute":{"type":"END"},"shape":"endControlNode","type":"node","y":562.5,"size":"80*34","x":430.5}],"edges":[{"id":"28167ea0","index":3,"source":"48d474ea","sourceAnchor":0,"target":"7ba480b3","targetAnchor":0},{"id":"e8d5ff52","index":4,"source":"7ba480b3","sourceAnchor":1,"target":"33202d60","targetAnchor":0}]}

The information of the directed acyclic graph (DAG) of the workflow.

HostName String emr-header-1.cluster-123456

The information of the host on which the application runs. The format is as follows: emr-header-1.cluster-123456.

Id String 7A39731FE719****

The ID of the workflow.

Name String my_flow_demo

The name of the workflow.

Periodic Boolean True

Indicates whether the workflow is periodically scheduled.

ProjectId String FP-3535FE0BE522****

The ID of the project.

StartSchedule Long 1541561443000

The start time of the scheduling of the workflow.

Status String UNDER_SCHEDULE

Status, supported STOP_SCHEDULE, UNDER_SCHEDULE.

Type String E-MapReduce

The type of the workflow. Valid value: EMR.

PageNumber Integer 1

The page number of the page returned.

PageSize Integer 20

The page number of the returned page.

RequestId String 7DDFF4C7-3AE3-485F-BFA1-BAE0AA3689DD

The ID of the request.

Total Integer 1

The total number of returned entries.

Examples

Sample request

http(s)://[Endpoint]/? Action=ListFlow
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<PageSize>500</PageSize>
<RequestId>7DDFF4C7-3AE3-485F-BFA1-BAE0AA3689DD</RequestId>
<PageNumber>1</PageNumber>
<Total>1</Total>
<Flow>
    <Flow>
        <StartSchedule>1541561443000</StartSchedule>
        <Status>UNDER_SCHEDULE</Status>
        <CategoryId>FC-2CF58396A189****</CategoryId>
        <Description>daily_0</Description>
        <ClusterId>C-F32FB31D8295****</ClusterId>
        <GmtModified>1542902401000</GmtModified>
        <ProjectId>FP-3535FE0BE522****</ProjectId>
        <Periodic>true</Periodic>
        <CronExpr>0 0 0 * * ? </CronExpr>
        <Name>daily_0</Name>
        <Type>EMR</Type>
        <GmtCreate>1541561048000</GmtCreate>
        <Id>F-D156B45E06F1****</Id>
        <EndSchedule>4102416001000</EndSchedule>
        <HostName/>
        <CreateCluster>false</CreateCluster>
    </Flow>
</Flow>

JSON format

{
    "PageSize": 500,
    "RequestId": "7DDFF4C7-3AE3-485F-BFA1-BAE0AA3689DD",
    "PageNumber": 1,
    "Total": 1,
    "Flow": {
        "Flow": [
            {
                "StartSchedule": 1541561443000,
                "Status": "UNDER_SCHEDULE",
                "CategoryId": "FC-2CF58396A189****",
                "Description": "daily_0",
                "ClusterId": "C-F32FB31D8295****",
                "GmtModified": 1542902401000,
                "ProjectId": "FP-3535FE0BE522****",
                "Periodic": true,
                "CronExpr": "0 0 0 * *? ",
                "Name": "daily_0",
                "Type": "EMR",
                "GmtCreate": 1541561048000,
                "Id": "F-D156B45E06F1****",
                "EndSchedule": 4102416001000,
                "HostName": "",
                "CreateCluster": false
            }
        ]
    }
}

Error codes

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