
# 查询流水线触发失败记录 - ListPipelineTriggerFailedRecords
#### 功能介绍
查询流水线触发失败记录
#### 调用方法
请参见[如何调用API](https://support.huaweicloud.com/api-pipeline/pipeline_03_0006.html)。
#### URI
GET /v5/{project_id}/api/pipelines/{pipeline_id}/trigger-failed-record
表1路径参数 
| 参数          | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|:---|:---|:---|:---|
| project_id  | 是    | String | **参数解释**： 项目ID，获取方式请参见[获取项目ID](https://support.huaweicloud.com/api-pipeline/pipeline_03_0036.html)。 **约束限制**： 不涉及。 **取值范围**： 32位字符，由数字和字母组成。 **默认取值**： 不涉及。                               |
| pipeline_id | 是    | String | **参数解释**： 流水线ID，可以通过[查询流水线列表](https://support.huaweicloud.com/api-pipeline/ListPipelines.html)接口获取，其中pipelines.pipelineId即为流水线ID。 **约束限制**： 不涉及。 **取值范围**： 32位字符，由数字和字母组成。 **默认取值**： 不涉及。 |
   
表2Query参数 
| 参数     | 是否必选 | 参数类型 | 描述   |
|:---|:---|:---|:---|
| offset | 是    | Long | 偏移量  |
| limit  | 是    | Long | 单页条数 |
   
#### 请求参数
无
#### 响应参数
**状态码：200**
表3响应Body参数 
| 参数                     | 参数类型                                                                                                          | 描述                                                                                                                                                                                            |
|:---|:---|:---|
| offset                 | Integer                                                                                                       | 偏移量                                                                                                                                                                                           |
| limit                  | Integer                                                                                                       | 单页条数                                                                                                                                                                                          |
| total                  | Integer                                                                                                       | **参数解释**： 总条目数量。 **取值范围**： 大于等于0。 |
| triggerFailedRecordVOS | Array of [triggerFailedRecordVOS] objects | 详情列表                                                                                                                                                                                          |
   
 表4triggerFailedRecordVOS 
| 参数            | 参数类型    | 描述     |
|:---|:---|:---|
| pipeline_id   | String  | 流水线ID  |
| trigger_time  | Integer | 触发时间   |
| trigger_type  | String  | 触发类型   |
| executor_id   | String  | 执行人ID  |
| executor_name | String  | 执行人名称  |
| reason        | String  | 触发失败原因 |
   
#### 请求示例
```
GET 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 | 响应体 |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-pipeline/ErrorCode.html)。
