首页 云工作流 云工作流 CloudFlow(新版) 开发参考 API参考 API目录 执行 ListExecutions - 获取一个流程的历史执行

ListExecutions - 获取一个流程的历史执行

更新时间: 2024-08-05 11:02:56

获取一个流程的所有历史执行。

接口说明

当您删除流程后,即便后续创建了同名流程,系统将不再支持查询原流程所有的执行历史。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
fnf:ListExecutionsget
  • 全部资源
    *

请求参数

名称类型必填描述示例值
FlowNamestring

流程名称。该名称在同一地域内唯一,创建后不可修改。取值说明如下:

  • 支持英文字符(a~z)或(A~Z)、数字(0~9)、下划线(_)和短划线(-)。
  • 首字母必须为英文字母(a~z)、(A~Z)或下划线(_)。
  • 区分大小写。
  • 长度为 1~128 个字符。
my_flow_name
NextTokenstring

执行查询开始名称,根据本接口返回获取。首次查询非必填。

flow_xxx
Limitinteger

查询数量。取值范围[1,100],默认值为 60。

1
Statusstring

需要过滤的执行状态。取值说明如下:

  • Starting
  • Running
  • Stopped
  • Succeeded
  • Failed
  • TimedOut
Succeeded
StartedTimeBeginstring

筛选某个执行的起始时间后的所有执行,格式为 UTC RFC3339。

2020-12-02T02:39:20.402Z
StartedTimeEndstring

筛选某个执行的起始时间前的所有执行,格式为 UTC RFC3339。

2020-12-02T02:23:54.817Z
ExecutionNamePrefixstring

执行的名称前缀。

run

返回参数

名称类型描述示例值
object

返回数据。

NextTokenstring

下个查询起始 Key,如无其他数据则不返回。

说明 返回结果中,可能因为没有下一页内容不显示该参数。
397aba96-4d85-11ef-9c97-************
RequestIdstring

请求 ID。

69AD2AA7-DB47-449B-941B-B14409DF****
Executionsarray<object>

执行信息。

object

执行信息。

Statusstring

执行的状态。

Succeeded
StoppedTimestring

执行停止时间。

2019-01-01T01:01:01.001Z
StartedTimestring

执行开始时间。

2019-01-01T01:01:01.001Z
FlowDefinitionstring

执行的流程定义。

旧版: "type: flow\nversion: v1\nname: my_flow_name\nsteps:\n - type: pass\n name: mypass" 新版: "Type: StateMachine\nSpecVersion: v1\nName: my_flow_name\nStartAt: my_state\nStates:\n - Type: Pass\n Name: my_state\n End: true"
Outputstring

执行的输出,为 JSON 对象格式。

{"key":"value"}
FlowNamestring

流程名称。

my_flow_name
Namestring

执行名称。

my_exec_name
Inputstring

执行的输入,为 JSON 对象格式。

{"key":"value"}

示例

正常返回示例

JSON格式

{
  "NextToken": "397aba96-4d85-11ef-9c97-************",
  "RequestId": "69AD2AA7-DB47-449B-941B-B14409DF****",
  "Executions": [
    {
      "Status": "Succeeded",
      "StoppedTime": "2019-01-01T01:01:01.001Z",
      "StartedTime": "2019-01-01T01:01:01.001Z",
      "FlowDefinition": "旧版:\n\"type: flow\\nversion: v1\\nname: my_flow_name\\nsteps:\\n  - type: pass\\n    name: mypass\"\n\n新版:\n\"Type: StateMachine\\nSpecVersion: v1\\nName: my_flow_name\\nStartAt: my_state\\nStates:\\n  - Type: Pass\\n    Name: my_state\\n    End: true\"",
      "Output": "{\"key\":\"value\"}",
      "FlowName": "my_flow_name",
      "Name": "my_exec_name",
      "Input": "{\"key\":\"value\"}"
    }
  ]
}

错误码

HTTP status code错误码错误信息描述
400ActionNotSupportedThe requested API operation '%s' is incorrect. Please check.-
400APIVersionNotSupportedThe requested API version '%s' is not supported yet. Please check.-
400EntityTooLargeThe payload size exceeds maximum allowed size (%s bytes).请求消息体过大。
400InvalidArgumentParameter error.请求参数错误。具体内容请参考实际错误信息。
400MissingRequiredHeaderThe HTTP header '%s' must be specified.请求所需参数缺失。具体内容请参考实际错误信息。
400MissingRequiredParamsThe HTTP query '%s' must be specified.请求所需参数缺失。具体内容请参考实际错误信息。
403AccessDeniedThe resources doesn't belong to you.-
403InvalidAccessKeyIDThe AccessKey ID %s is invalid.AccessKey ID无效。
403RequestTimeTooSkewedThe difference between the request time %s and the current time %s is too large.您的请求时间不正确,该请求已被识别为无效。请参考通用参数一节。
403SignatureNotMatchThe request signature we calculated does not match the signature you provided. Check your access key and signing method.您发起请求的签名与我们计算不一致,请检查您的签名算法及AccessKey Secret。
404FlowNotExistsFlow %s does not exist.所请求资源不存在,请确保流程已创建。
412PreconditionFailedThe resource to be modified has been changed.资源查看或更新检查失败,该资源可能已被更改。请稍后重试。
415UnsupportedMediaTypeThe content type must be "application/json".请求消息体类型错误。
429ResourceThrottledThe request is throttled. Please try again later.因某些原因系统流量已达瓶颈。请稍后重试。
500InternalServerErrorAn internal error has occurred. Please retry.服务器内部错误。请稍后重试。

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2024-03-21OpenAPI 错误码发生变更、OpenAPI 入参发生变更查看变更详情
上一篇: DescribeExecution - 获取一次执行的状态信息 下一篇: GetExecutionHistory - 获取一次执行的步骤详情
阿里云首页 云工作流 相关技术圈