Create rule
POST/rules
Create rule.
Authorization Action:
ruleengine:rules:create
Request
- application/json
Body
required
- Array [
- ]
- Array [
- ]
- Array [
- ThresholdConditionParamsDto
- LastMessageOlderThanConditionParamsDto
- DeltaConditionParamsDto
- ]
Possible values: [info
, warning
, critical
]
Possible values: [enabled
, disabled
]
Default value: enabled
tags object[]
Other custom properties associated to the tag
notification objectrequired
messages object[]required
Notification target: can be an email address, a phone number or a telegram account. If not specified, the notification target is set to the user that created the rule.
Possible values: [trigger
, reentry
]
Possible values: [email
, telegram
, sms
, slack
, discord
, fcm
, msteams
]
conditions object[]required
params objectrequired
URN of the metric to be monitored
Possible values: [>
, >=
, <
, <=
, ==
, !=
]
Possible values: <= 86400
activeWindow object
Possible values: Value must match regular expression /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/
Possible values: Value must match regular expression /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/
IANA timezone identifier
Possible values: <= 86400
activeWindow object
Possible values: Value must match regular expression /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/
Possible values: Value must match regular expression /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/
IANA timezone identifier
URN of the metric to be monitored
Possible values: [>
, >=
, <
, <=
, ==
, !=
]
Possible values: <= 86400
activeWindow object
Possible values: Value must match regular expression /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/
Possible values: Value must match regular expression /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/
IANA timezone identifier
Possible values: [threshold
, lastMessageOlderThan
, delta
]
Responses
- 201
- 400
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ThresholdConditionParamsDto
- LastMessageOlderThanConditionParamsDto
- DeltaConditionParamsDto
- ]
- Array [
- ]
- Array [
- ]
conditions object[]required
params objectrequired
URN of the metric to be monitored
Possible values: [>
, >=
, <
, <=
, ==
, !=
]
Possible values: <= 86400
activeWindow object
Possible values: Value must match regular expression /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/
Possible values: Value must match regular expression /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/
IANA timezone identifier
Possible values: <= 86400
activeWindow object
Possible values: Value must match regular expression /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/
Possible values: Value must match regular expression /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/
IANA timezone identifier
URN of the metric to be monitored
Possible values: [>
, >=
, <
, <=
, ==
, !=
]
Possible values: <= 86400
activeWindow object
Possible values: Value must match regular expression /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/
Possible values: Value must match regular expression /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/
IANA timezone identifier
Possible values: [active
, inactive
]
Possible values: [threshold
, lastMessageOlderThan
, delta
]
tags object[]required
Other custom properties associated to the tag
Possible values: [active
, inactive
]
Possible values: [info
, warning
, critical
]
Possible values: [enabled
, disabled
]
Default value: enabled
notification objectrequired
messages object[]required
Notification target: can be an email address, a phone number or a telegram account. If not specified, the notification target is set to the user that created the rule.
Possible values: [trigger
, reentry
]
Possible values: [email
, telegram
, sms
, slack
, discord
, fcm
, msteams
]
{
"conditions": [
{
"params": {},
"status": "active",
"createdAt": "2024-08-30T08:48:05.877Z",
"updatedAt": "2024-08-30T08:48:05.877Z",
"deletedAt": "2024-08-30T08:48:05.877Z",
"type": "threshold",
"id": "string"
}
],
"tags": [
{
"createdAt": "2024-08-30T08:48:05.877Z",
"updatedAt": "2024-08-30T08:48:05.877Z",
"deletedAt": "2024-08-30T08:48:05.877Z",
"label": "string",
"labelValue": "string",
"metadata": {},
"id": "string"
}
],
"status": "active",
"createdAt": "2024-08-30T08:48:05.877Z",
"updatedAt": "2024-08-30T08:48:05.877Z",
"deletedAt": "2024-08-30T08:48:05.877Z",
"name": "string",
"severity": "info",
"description": "string",
"processable": "enabled",
"notification": {
"messages": [
{
"target": "string",
"policy": "trigger",
"medium": "email",
"text": "string"
}
]
},
"id": "string"
}
Missing user identity id