获取执行信息DescribeExecution
更新时间:2024-07-05
接口描述
- 本接口用于查询用户工作流下某个执行的情况。
请求结构
GET /v1/execution HTTP/1.1
Host: xflow.bj.baidubce.com
Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必须 | 参数位置 | 描述 |
---|---|---|---|---|
flowName | string | 是 | Query参数 | 工作流名称 |
executionName | string | 是 | Query参数 | 某次执行的名字 |
响应头域
除公共头域,无其它特殊头域。
响应参数
参数名称 | 类型 | 描述 |
---|---|---|
input | string | 执行的输入数据 |
output | string | 执行的输出信息,若还未执行完则为空字符串 |
startedTime | int | 执行的开始时间戳 |
stoppedTime | int | 执行的结束时间戳,若未执行完则为0 |
flowName | string | 执行所属的工作流的名称 |
name | string | 执行的名称 |
status | string | 执行的状态,可能的值有Fail/Succeed/Running/Stopped/Timeout |
flowDefinition | string | 执行的工作流的定义 |
请求示例
GET /v1/execution?flowName=testWorkFlow&executionName=testExecutionName HTTP/1.1
Authorization: Authorization string
Host: xflow.bj.baidubce.com
响应示例
HTTP/1.1 200
Content-type: application/json
{
"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"
}