工作流列表ListFlow
所有文档
menu

函数计算 CFC

工作流列表ListFlow

产品详情立即开通

接口描述

  • 本接口用于查询用户工作流列表。

请求结构

GET /v1/flows   HTTP/1.1
Host: xflow.bj.baidubce.com
Authorization: authorization string

请求头域

除公共头域外,无其它特殊头域。

请求参数

响应头域

除公共头域,无其它特殊头域。

响应参数

参数名称 类型 描述
flows Flow数组 flow列表

请求示例

GET /v1/flows HTTP/1.1
Authorization: Authorization string
Host: xflow.bj.baidubce.com

响应示例

HTTP/1.1 200
Content-type: application/json
	
{
"flows":[
    {
        "createdTime":"2021-12-16T12:43:11+08:00",
        "definition":"name: demo\nstart: initData\nstates:\n  - type: pass\n    name: initData\n    data:\n      hello: world\n    next: demoSwitch\n  - type: switch\n    name: demoSwitch\n    description: \"using jq expression to decide whether to exec demo\"\n    conditions:\n      - condition: .execDemo == true\n        next: startExec\n      - condition: .execDemo == false\n        next: stop\n    default:\n      next: startExec\n  - type: parallel\n    name: startExec\n    next: succ\n    branches:\n      - start: wait3s\n        states:\n          - type: wait\n            name: wait3s\n            seconds: 3\n            end: true\n      - start: invokeCfc\n        states:\n          - type: operation\n            name: invokeCfc\n            resource: \"brn:bce:cfc:bj:7c54a6e14823a11c:function:test:$LATEST\"\n            end: true\n            catch:\n              - errors:\n                  - XFlow.ALL\n                next: errorHandler\n          - type: pass\n            name: errorHandler\n            end: true\n  - type: fail\n    name: stop\n    cause: \"stop demo\"\n  - type: succeed\n    name: succ",
        "description":"this is a xflow demo 1",
        "lastModifiedTime":"2021-12-24T13:42:16+08:00",
        "name":"complex-demo",
        "type":"FDL"
    },
    {
        "createdTime":"2021-12-17T15:45:57+08:00",
        "definition":"name: example\nstart: s1\nstates:\n  - name: s1\n    type: foreach\n    inputCollection: \"[.orders[]]\"\n    iterationParam: order\n    outputCollection: \".results\"\n    iterator:\n      start: s2\n      states:\n        - type: operation\n          name: s2\n          resource: \"brn:bce:cfc:su:7c54a6e14823a11c9f9f5345952ac336:function:test-c:$LATEST\"\n          end: true\n    end: true",
        "lastModifiedTime":"2021-12-17T15:45:57+08:00",
        "name":"foreach-example",
        "type":"FDL"
    }
    ]
} 
上一篇
获取执行历史GetExecutionHistory
下一篇
创建工作流CreateFlow