创建订阅规则
POST
https://api.flashcat.cloud/api/n9e/busi-group/{id}/alert-subscribes
最后修改时间:2025-03-17 01:52:51
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.flashcat.cloud/api/n9e/busi-group//alert-subscribes' \
--header 'Content-Type: application/json' \
--data-raw '{
"note": "string",
"cate": "string",
"datasource_ids": [
0
],
"severities": [
0
],
"busi_groups": [
{
"value": "string",
"func": "string"
}
],
"tags": [
{
"func": "string",
"key": "string",
"value": "string"
}
],
"rule_ids": [
0
],
"cluster": "string",
"for_duration": 0,
"redefine_severity": 0,
"new_severity": 0,
"notify_rule_ids": [
0
],
"user_group_ids": "string",
"redefine_channels": 0,
"new_channels": "string",
"redefine_webhooks": 0,
"webhooks": [
"string"
]
}'
响应示例响应示例
{
"note": "t1",
"cate": "prometheus",
"datasource_ids": [
1
],
"severities": [
1,
2,
3
],
"busi_groups": [
{
"value": "Default Busi Group",
"func": "=="
}
],
"tags": [
{
"func": "==",
"key": "ident",
"value": "hostname1"
}
],
"user_group_ids": "1",
"redefine_severity": 1,
"new_severity": 2,
"redefine_channels": 1,
"new_channels": "wecom",
"redefine_webhooks": 1,
"webhooks": [
"http:/flashcat.cloud/callback"
],
"rule_ids": [
1
],
"cluster": "0"
}
请求参数
Path 参数
id
string
业务组Id
Body 参数application/json