curl --location --request POST 'https://api.flashcat.cloud/api/n9e/busi-group//alert-rules' \
--header 'X-User-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"disabled": 0,
"name": "string",
"append_tags": [
"string"
],
"group_id": 0,
"note": "string",
"prod": "string",
"cate": "string",
"datasource_queries": [
{
"match_type": "string",
"op": "string",
"values": [
0
]
}
],
"rule_config": {
"inhibit": true,
"queries": {
"from": 0,
"to": 0,
"ref": "string",
"queries": [
{
"region": "string",
"namespace": "string",
"metric_name": "string",
"dimensions": [
{
"name": "string",
"value": "string"
}
],
"expression": "string",
"period": 0,
"statistic": "string",
"query_id": "string",
"query_type": "string",
"metric_editor_mode": 0,
"offset": 0,
"return_data": true,
"match_exact": true,
"ref": "string",
"unit": "string",
"alias": "string"
}
]
},
"triggers": [
{}
],
"event_relabel_config": [
{
"action": "string",
"regex": "string",
"replacement": "string",
"separator": "string",
"source_labels": [
"string"
],
"target_label": "string"
}
],
"task_tpls": [
{
"tpl_id": "string",
"tpl_name": "string",
"host": [
"string"
]
}
]
},
"cron_pattern": "string",
"notify_version": "string",
"notify_rule_ids": [
0
],
"notify_channels": [
"string"
],
"notify_groups": [
"string"
],
"notify_recovered": 0,
"recover_duration": 0,
"notify_repeat_step": 0,
"notify_max_number": 0,
"callbacks": [
"string"
],
"annotations": {
"dashboard_url": "string"
},
"enable_days_of_weeks": [
[
"string"
]
],
"enable_stimes": [
"string"
],
"enable_etimes": [
"string"
],
"extra_config": {
"enrich_queries": [
"string"
]
}
}'