
# 流水线官方消息通知查询 - ShowPipelineOfficialNotice
#### 功能介绍
流水线官方消息通知查询
#### 调用方法
请参见[如何调用API](https://support.huaweicloud.com/api-pipeline/pipeline_03_0006.html)。
#### URI
GET /v5/{project_id}/api/pipeline-notices/{pipeline_id}/notice
表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位字符，由数字和字母组成。 **默认取值**： 不涉及。 |
   
#### 请求参数
无
#### 响应参数
**状态码：200**
表2响应Body参数 
| 参数       | 参数类型                                                                                                      | 描述                                                                                                                                                                      |
|:---|:---|:---|
| \[数组元素\] | Array of [QueryPipelineNoticeResp] objects | **参数解释**： 响应体。 **取值范围**： 不涉及。 |
   
 表3QueryPipelineNoticeResp 
| 参数          | 参数类型                                                                    | 描述                                                                                                                                                                       |
|:---|:---|:---|
| event_type  | String                                                                  | **参数解释**： 事件类型。 **取值范围**： 不涉及。 |
| notice_data | [notice_data] object | **参数解释**： 通知详情。 **取值范围**： 不涉及。 |
   
 表4notice_data 
| 参数           | 参数类型             | 描述                                                                                                                                                                            |
|:---|:---|:---|
| notice_types | Array of strings | **参数解释**： 流水线消息通知类型。 **取值范围**： 不涉及。 |
| notice_roles | Array of strings | **参数解释**： 通知规则。 **取值范围**： 不涉及。      |
| notice_users | String           | **参数解释**： 通知用户。 **取值范围**： 不涉及。      |
   
#### 请求示例
```
GET https://(endpoint)/v5/e2e18230a85d4d6ab0b56cb6d2246c18/api/pipeline-notices/0747d5a7099e45f69dc1d099945909a9/notice
```
#### 响应示例
**状态码：200**
响应体
```
[ {
  "event_type" : "pipeline.updated",
  "notice_data" : {
    "notice_types" : [ "MESSAGE" ],
    "notice_roles" : [ "CREATOR", "EXECUTOR", "COLLECTOR" ],
    "notice_users" : null
  }
}, {
  "event_type" : "pipeline.deleted",
  "notice_data" : {
    "notice_types" : [ "MESSAGE" ],
    "notice_roles" : [ "CREATOR", "EXECUTOR", "COLLECTOR" ],
    "notice_users" : null
  }
}, {
  "event_type" : "pipelineRun.succeed",
  "notice_data" : {
    "notice_types" : [ "MESSAGE" ],
    "notice_roles" : [ "CREATOR", "EXECUTOR", "COLLECTOR" ],
    "notice_users" : null
  }
}, {
  "event_type" : "pipelineRun.failed",
  "notice_data" : {
    "notice_types" : [ "MESSAGE" ],
    "notice_roles" : [ "CREATOR", "EXECUTOR", "COLLECTOR" ],
    "notice_users" : null
  }
} ]
```
#### 状态码
| 状态码 | 描述  |
|:---|:---|
| 200 | 响应体 |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-pipeline/ErrorCode.html)。
