通知模板-更新
PUT
https://api.flashcat.cloud/api/n9e/notify-tpl/content
最后修改时间:2024-03-08 11:41:12
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://api.flashcat.cloud/api/n9e/notify-tpl/content' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": 1,
"name": "企微",
"channel": "wecom",
"content": "**级别状态**: {{if .IsRecovered}}<font color=\"info\">S{{.Severity}} Recovered</font>{{else}}<font color=\"warning\">S{{.Severity}} Triggered</font>{{end}} \n**规则标题**: {{.RuleName}}{{if .RuleNote}} \n**规则备注**: {{.RuleNote}}{{end}}{{if .TargetIdent}} \n**监控对象**: {{.TargetIdent}}{{end}} \n**监控指标**: {{.TagsJSON}}{{if not .IsRecovered}} \n**触发时值**: {{.TriggerValue}}{{end}} \n{{if .IsRecovered}}**恢复时间**: {{timeformat .LastEvalTime}}{{else}}**首次触发时间**: {{timeformat .FirstTriggerTime}}{{end}} \n{{$time_duration := sub now.Unix .FirstTriggerTime }}{{if .IsRecovered}}{{$time_duration = sub .LastEvalTime .FirstTriggerTime }}{{end}}**持续时长**: {{humanizeDurationInterface $time_duration}} \n**发送时间**: {{timestamp}} \n**描述**: {{index .TagsMap \"instance\"}} \n**描述2**: {{index .TagsMap \"ident\"}}"
}'
响应示例响应示例
{}
请求参数
Body 参数application/json