Update rules
5 min
Update rules
Update the rules set of monitor
PUT
https://api-sandbox.klavi.ai/monitor/v1/monitors/{id}/rules
curl --location --globoff --request PUT 'https://api-sandbox.klavi.ai/monitor/v1/monitors/{id}/rules/{id}' \
--header 'Authorization: string' \
--data '{
"rule":
{
"relation": "and",
"children":
[
{
"field": "BALANCE_INCREASE",
"value": 12,
"operator": ">="
},
{
"field": "BALANCE_AMOUNT",
"value": 12,
"operator": ">="
}
]
}
}'Parameter
children
field
Currently only supports monitoring balance related indicators, including: BALANCE_AMOUNT and BALANCE_INCREASE.
operator
Comparison operator, currently only supports >=, !=.
value
Amount, numeric type.
rule
field | operator | value |
|---|---|---|
BALANCE_AMOUNT | >=, != | If operator is equal to >=, then value can only be a number. If operator is equal to !=, then value can only be null. |
BALANCE_INCREASE | >= | Only numbers. |