You need to enable JavaScript to run this app.
文档中心
托管 Prometheus

托管 Prometheus

复制全文
下载 pdf
通知消息模版
ListNotifyTemplates
复制全文
下载 pdf
ListNotifyTemplates
获取告警通知模版。
请求说明
托管 Prometheus 已在全球多个地域部署服务,旨在为您提供更稳定、低延迟的访问体验。您可以通过查阅 服务地址 文档,根据业务所在地域,选择最合适的接入点。
  • 请求方式:POST
  • 请求地址:https://vmp.cn-beijing.volcengineapi.com?Action=ListNotifyTemplates&Version=2021-03-03
调试
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
请求参数
参数
类型
是否必选
示例值
描述
Action
String
ListNotifyTemplates
接口名称。当前 API 的名称为 ListNotifyTemplates
Version
String
2021-03-03
接口版本。当前 API 的版本为 2021-03-03
PageNumber
Long
1
当前页数,最小值或默认值均为 1。
PageSize
Long
10
单页数量,取值范围为 0~100,默认值为 10。
Filter
-
过滤条件。
SortBy
String
CreatedAt
查询结果是否进行排序,取值CreatedAt表示进行排序;不配置该字段表示不进行排序。
SortOrder
String
Asc
查询结果的排序原则,取值:
  • Asc:表示按照升序排序。
  • Desc:表示按照降序排序。
NotifyTemplateFilter
参数
类型
是否必选
示例值
描述
Ids
Array of String
["e28ae750-bbb8-4ff4-abf4***"]
按 ID 过滤,精确查询。
Name
String
template-demo
按名称过滤,模糊查询。
Channel
String
LarkBot
按渠道查询,精确匹配。取值:
  • LarkBotWebhook:飞书告警通知模版。
  • DingTalkBotWebhook:钉钉告警通知模版。
  • WeComBotWebhook:企业微信告警通知模版。
请求示例
POST https://vmp.cn-beijing.volcengineapi.com?Action=ListNotifyTemplates&Version=2021-03-03
Content-Type: application/json
{
"PageNumber": 1,
"PageSize": 10,
"Filter": {
"Ids": [
"e28ae750-bbb8-4ff4-abf4***"
],
"Name": "template-demo",
"Channel": "LarkBot"
},
"SortBy": "CreatedAt",
"SortOrder": "Asc"
}
返回参数
参数
类型
示例值
描述
Total
Long
100
查询结果总数。
Items
Array of NotifyTemplate
-
查询结果列表。
NotifyTemplate
参数
类型
示例值
描述
Id
String
test
告警通知模板 ID。
Name
String
test
告警通知模板名称。
Active
-
告警通知模板。
Channel
String
LarkBotWebhook
告警通知渠道。
Resolved
-
告警恢复通知模板。
CreateTime
String
2020-01-01T00:00:00Z
告警通知模板的创建时间。
UpdateTime
String
2020-01-01T00:00:00Z
告警通知模板的更新时间。
Description
String
这是一段描述
告警通知模板的描述信息。
NotifyIntervalTemplate
参数
类型
示例值
描述
Title
String
火山 {{ .Region }} 正在发生告警
模版的标题。
Content
String
告警规则: [{{ .AlertingRuleName }}]({{ .AlertingRuleDetailURL }})
告警级别: {{ .Level }}
告警条件: {{ .PromQL }} {{ .Comparator }} {{ .Threshold }} [ 持续 {{ .For }} ]
模版的内容。更多配置方式,请参见 飞书消息通知模板变量结构和参数
返回示例
HTTP/1.1: 200 OK
Content-Type: application/json
{
"ResponseMetadata": {
"RequestId": "20230604110420****100232280022D31",
"Action": "ListNotifyTemplates",
"Version": "2021-03-03",
"Service": "vmp",
"Region": "cn-beijing"
},
"Result": {
"Total": 100,
"Items": [
{
"Id": "test",
"Name": "test",
"Active": {
"Title": "火山 {{ .Region }} 正在发生告警",
"Content": "**告警规则**: [{{ .AlertingRuleName }}]({{ .AlertingRuleDetailURL }})\n**告警级别**: {{ .Level }}\n**告警条件**: {{ .PromQL }} {{ .Comparator }} {{ .Threshold }} [ 持续 {{ .For }} ]"
},
"Channel": "LarkBotWebhook",
"Resolved": {
"Title": "火山 {{ .Region }} 正在发生告警",
"Content": "**告警规则**: [{{ .AlertingRuleName }}]({{ .AlertingRuleDetailURL }})\n**告警级别**: {{ .Level }}\n**告警条件**: {{ .PromQL }} {{ .Comparator }} {{ .Threshold }} [ 持续 {{ .For }} ]"
},
"CreateTime": "2020-01-01T00:00:00Z",
"UpdateTime": "2020-01-01T00:00:00Z",
"Description": "这是一段描述"
}
]
}
}
错误码
本接口错误码如下表所示,公共错误码请参见 公共错误码
HTTP 状态码
错误码
错误信息
说明
400
InvalidParameter.{{parameter}}
The specified parameter {{parameter}} is invalid.
输入不合法,如工作区名称不合法等。
400
MissingParameter.{{parameter}}
The required parameter {{parameter}} is missing.
缺少必要的参数。
403
ProductUnsubscribed
You are not subscribed to VMP. Please go to the VMP console web page to subscribe to the service
当前账号未订阅 VMP 服务。
最近更新时间:2025.11.05 17:12:27
这个页面对您有帮助吗?
有用
有用
无用
无用