Skip to main content
POST
/
api
/
alarm
/
rule
/
add
添加告警规则
curl --request POST \
  --url https://api.example.com/api/alarm/rule/add \
  --header 'Authentication: <authentication>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "ID": 1,
  "Name": "示例告警规则",
  "TimeWindow": 3600,
  "TriggerType": "阈值触发",
  "Condition": {
    "left": "temperature",
    "right": 30,
    "operator": ">"
  },
  "Enabled": true,
  "CreatedAt": "2025-07-08 16:13:10",
  "UpdatedAt": "2025-07-08 16:13:10"
}
'
{}

Headers

Authentication
string
default:{{token_1}}
required

Body

application/json
ID
integer
required
Name
string
required
TimeWindow
integer
required
TriggerType
string
required
Condition
object
required
Enabled
boolean
required
CreatedAt
string
required
UpdatedAt
string
required

Response

200 - application/json

The response is of type object.