文档首页/ 流水线 CodeArts Pipeline/ API参考/ API/ 流水线管理/ 查询流水线触发失败记录
更新时间:2024-08-22 GMT+08:00
分享

查询流水线触发失败记录

功能介绍

查询流水线触发失败记录

调用方法

请参见如何调用API

URI

GET /v5/{project_id}/api/pipelines/{pipeline_id}/trigger-failed-record

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

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

pipeline_id

String

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

表2 Query参数

参数

是否必选

参数类型

描述

offset

Long

偏移量

limit

Long

单页条数

请求参数

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

offset

Integer

偏移量

limit

Integer

单页条数

total

Integer

总数

triggerFailedRecordVOS

Array of triggerFailedRecordVOS objects

详情列表

表4 triggerFailedRecordVOS

参数

参数类型

描述

pipeline_id

String

流水线ID

trigger_time

Integer

触发时间

trigger_type

String

触发类型

executor_id

String

执行人ID

executor_name

String

执行人名称

reason

String

触发失败原因

请求示例

https://(endpoint)/v5/e2e18230a85d4d6ab0b56cb6d2246c18/api/pipelines/dc73b5ed58a64ab7a469b9480e5f6632/trigger-failed-record?offset=0&limit=10

响应示例

状态码: 200

响应体

{
  "offset" : 0,
  "limit" : 10,
  "total" : 3,
  "triggerFailedRecordVOS" : [ {
    "pipeline_id" : "dc73b5ed58a64ab7a469b9480e5f6632",
    "trigger_time" : 1718956712000,
    "trigger_type" : "Push",
    "executor_id" : "123456",
    "executor_name" : "12-5",
    "reason" : "触发分支未在白名单"
  }, {
    "pipeline_id" : "dc73b5ed58a64ab7a469b9480e5f6632",
    "trigger_time" : 1718956668000,
    "trigger_type" : "Push",
    "executor_id" : "456",
    "executor_name" : "456-5",
    "reason" : "触发分支未在白名单"
  }, {
    "pipeline_id" : "dc73b5ed58a64ab7a469b9480e5f6632",
    "trigger_time" : 1718956660000,
    "trigger_type" : "Push",
    "executor_id" : "789",
    "executor_name" : "78-5",
    "reason" : "触发分支未在白名单"
  } ]
}

状态码

状态码

描述

200

响应体

错误码

请参见错误码

相关文档