跳转到主要内容
告警与响应相关接口/告警通道与集成
PUTAlerting起始版本 1.0同步需要认证

更新告警渠道

更新已存在通知渠道配置。

调试可用性

在线调试

使用当前认证信息和示例参数提交 Mock 请求。

路径参数

请求参数

路径参数

  • uuidString必填

    资源的UUID,唯一标识该资源。

请求体字段

  • nameString必填

    资源名称。

    示例: Updated Ops Channel

  • descriptionString必填

    资源的详细描述。

    示例: Updated description

  • configObject必填

    配置信息。

    示例: (nested object)

  • templateIdString必填

    模板ID。

    示例: tmpl-email-002

  • statusString必填

    状态信息。

    示例: disabled

响应状态

200 OK

该 API 成功时返回以下响应结构。

  • uuidString

    资源的UUID,唯一标识该资源。

    示例: chan-001

  • nameString

    资源名称。

    示例: Ops Email Channel

  • descriptionString

    资源的详细描述。

    示例: Email notifications for operations team

  • typeString

    类型。

    示例: email

  • statusString

    状态信息。

    示例: active

  • configObject

    配置信息。

    示例: (nested object)

  • templateIdString

    模板ID。

    示例: tmpl-email-001

  • alertCountString

    告警数量。

    示例: 150

  • createDateString

    创建时间。

    示例: 2026-01-15T08:00:00Z

  • lastOpDateString

    最近一次操作时间。

    示例: 2026-01-15T08:00:00Z

请求地址

PUT/api/v1/alerting/channels/{uuid}

/api/v1/alerting/channels/{uuid}

操作 ID

UpdateAlertChannel

永久链接

请求示例

curl -X PUT '{host}/api/v1/alerting/channels/{uuid}' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"name":"Updated Ops Channel","description":"Updated description","config":"(nested object)","templateId":"tmpl-email-002","status":"disabled"}'

响应示例

200
{
  "uuid": "chan-001",
  "name": "Ops Email Channel",
  "description": "Email notifications for operations team",
  "type": "email",
  "status": "active",
  "config": null,
  "templateId": "tmpl-email-001",
  "alertCount": 150
}

变更历史

此 API 暂无变更历史记录。

查看全部变更历史