文档首页/ 流水线 CodeArts Pipeline/ API参考/ API/ 流水线管理/ 查询流水线的旧版运行记录
更新时间:2024-08-22 GMT+08:00
分享

查询流水线的旧版运行记录

功能介绍

查询流水线的旧版运行记录

调用方法

请参见如何调用API

URI

POST /v5/{project_id}/api/pipelines/{pipeline_id}/pipeline-runs/list-legacy

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

参数解释: CodeArts项目ID。 约束限制: 不涉及 取值范围: 32位字符。 默认取值: 不涉及。

pipeline_id

String

参数解释: 流水线ID。 约束限制: 不涉及 取值范围: 32位字符。 默认取值: 不涉及。

请求参数

表2 请求Body参数

参数

是否必选

参数类型

描述

offset

Long

偏移量

limit

Long

单页条数

status

String

状态

sort_key

String

排序的KEY

sort_dir

String

排序类型,非必选。asc按排序字段升序,desc按排序字段降序

start_time

String

起始时间

end_time

String

结束时间

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

offset

Integer

偏移量

limit

Integer

单页条数

total

Integer

总数

pipeline_runs

Array of pipeline_runs objects

详情列表

表4 pipeline_runs

参数

参数类型

描述

pipeline_id

String

流水线ID

pipeline_run_id

String

流水线运行实例ID

executor_id

String

执行人ID

executor_name

String

执行人名称

executor_user_name

String

执行人用户名

stage_status_list

Array of stage_status_list objects

阶段状态

status

String

运行状态

run_number

Integer

运行序号

trigger_type

String

触发类型

build_params

String

构建参数

artifact_params

String

构建产物参数

start_time

Integer

开始时间

end_time

Integer

结束时间

modify_url

String

修改URL

detail_url

String

详情URL

表5 stage_status_list

参数

参数类型

描述

id

String

阶段ID

name

String

阶段名称

sequence

Integer

阶段序号

status

String

阶段状态

start_time

String

开始时间

end_time

String

结束时间

请求示例

https://(endpoint)/v5/db8d07265e24426598b3eb03a7818972/api/pipelines/e69862ac24f843fcb4ce4d5fe88ebcb7/pipeline-runs/list-legacy

响应示例

状态码: 200

响应体

{
  "offset" : 0,
  "limit" : 10,
  "total" : 1,
  "pipeline_runs" : [ {
    "pipeline_id" : "e69862ac24f843fcb4ce4d5fe88ebcb7",
    "pipeline_run_id" : "703177350",
    "executor_id" : "847a5317086c41798469d0868535943a",
    "executor_name" : "be123",
    "executor_user_name" : "test",
    "stage_status_list" : [ {
      "id" : "",
      "name" : "流水线源",
      "sequence" : 0,
      "status" : "COMPLETED",
      "start_time" : "2024-06-21 14:38:07",
      "end_time" : "2024-06-21 14:38:07"
    }, {
      "id" : "",
      "name" : "构建和检查",
      "sequence" : 1,
      "status" : "COMPLETED",
      "start_time" : "2024-06-21 14:38:07",
      "end_time" : "2024-06-21 14:38:07"
    } ],
    "status" : "COMPLETED",
    "run_number" : 1,
    "trigger_type" : "Manual",
    "build_params" : null,
    "artifact_params" : null,
    "start_time" : 1718951888000,
    "end_time" : 1718951888000,
    "modify_url" : null,
    "detail_url" : null
  } ]
}

状态码

状态码

描述

200

响应体

错误码

请参见错误码

相关文档