Create a new rule
POST/api/v2/rules/define
This endpoint allows you to define a new rule. The rule must include at least one time-based criterion; otherwise, the request will fail with an appropriate error message. Additionally, the rule must define either a limiter or a pattern—if neither is provided, a 400 Bad Request error will be returned. A valid rule must also specify a name and an associated action. Upon successful validation, the rule is saved to the database, and a success response is returned.
Request
Responses
- 201
- 400
Rule successfully created
No criteria defined in the rule