获取执行列表ListExecutions
更新时间:2024-07-05
接口描述
- 本接口用于查询用户工作流执行列表。
请求结构
GET /v1/executions HTTP/1.1
Host: xflow.bj.baidubce.com
Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必须 | 参数位置 | 描述 |
---|---|---|---|---|
flowName | string | 是 | Query参数 | 工作流名称 |
响应头域
除公共头域,无其它特殊头域。
响应参数
参数名称 | 类型 | 描述 |
---|---|---|
executions | Execution数组 | 所有执行的信息 |
total | number | 总数 |
请求示例
GET /v1/executions?flowName=testWorkFlow HTTP/1.1
Authorization: Authorization string
Host: xflow.bj.baidubce.com
响应示例
HTTP/1.1 200
Content-type: application/json
{
"total":10,
"executions":[
{
"output":"",
"input":"exercitation irure est voluptate anim",
"startedTime":1679389309000,
"stoppedTime":1679389312000,
"flowName":"comb-test",
"name":"test",
"status":"Running",
"flowDefinition":"\nname: demo\nstart: makeData\nstates:\n - type: pass\n name: makeData\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: wait1s\n states:\n - type: wait\n name: wait1s\n seconds: 1\n next: throwSucceed \n - type: succeed\n name: throwSucceed\n - start: wait3s\n states:\n - type: wait\n name: wait3s\n seconds: 3\n next: invokeCfc\n - type: operation\n name: invokeCfc\n resource: \"brn:bce:cfc:bj:7c54a6e14823a11c:function:test:$LATEST\"\n end: true\n retry:\n - errors:\n - XFlow.ALL\n intervalSeconds: 2\n maxAttempts: 1 \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"
}
]
}