文档首页/ 流水线 CodeArts Pipeline/ API参考/ API/ 流水线管理/ 流水线官方消息通知查询
更新时间:2024-08-22 GMT+08:00
分享

流水线官方消息通知查询

功能介绍

流水线官方消息通知查询

调用方法

请参见如何调用API

URI

GET /v5/{project_id}/api/pipeline-notices/{pipeline_id}/notice

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

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

pipeline_id

String

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

请求参数

响应参数

状态码: 200

表2 响应Body参数

参数

参数类型

描述

[数组元素]

Array of QueryPipelineNoticeResp objects

响应体

表3 QueryPipelineNoticeResp

参数

参数类型

描述

event_type

String

事件类型

notice_data

notice_data object

详情

表4 notice_data

参数

参数类型

描述

notice_types

Array of strings

通知类型

notice_roles

Array of strings

通知规则

notice_users

String

通知用户

请求示例

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

响应体

错误码

请参见错误码

相关文档