Alerts
Creates a new alert rule.
Creates an alert rule for the authenticated account and returns the created resource, including its newly assigned ID, with a Location header pointing at the GetAlertRuleById route.
The rule_set field, when provided, must be a JSON string describing the trigger conditions. Its schema and validation rules are documented on RevelDigital.Core.PublicApi.Models.AlertRuleRequest.RuleSet. Invalid rule sets are rejected with 400. Requires the AlertRules_Edit securable.
post/alerts/rules
Request
- Base URLhttps://api.reveldigital.com
- Auth
- OAuth 2Authorization codehttps://id.reveldigital.com/connect/authorizeToken URLhttps://id.reveldigital.com/connect/tokenScopeswebapi
- or API key in header X-RevelDigital-ApiKey
- or API key in query parameter api_key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"rule_set": "[{\"items\":[{\"type\":\"CpuUsage\",\"op\":\"GTE\",\"value\":[90]},{\"type\":\"MemoryUsage\",\"op\":\"GTE\",\"value\":[95]}]}]"
}Response
The alert rule was created; the body contains the created rule.
Changes
No recorded changes to this operation across all 3 revisions of this API.