Add/modify a monitor rule.
Version: 1.3
Required Permissions: Full
HTTP method: POST
Supported by Editions: Zend Server
Request Parameters:
Parameter |
Type |
Required |
Description |
rulesIds |
Integer |
Yes |
The ruleId of the rule to be set. -1 for new rule |
ruleProperties |
Array |
Yes |
Associative array with the following mandatory rule properties: "rule_type_id", "rule_parent_id", "app_id", "name", "enabled" (1|0), "description", "url" and the following optional property: "creator" (0|1|2) - creator field with value “0” indicates that this is a Global rule, while value “1” indicates that this is a user defined rule and value“2” indicates that this rule originated from an application package. Default value is 1 |
ruleConditions |
Array |
No |
Optional Array of conditions, each condition should have the following list of properties: "condition_id", "operation", "attribute", "operand" . |
ruleTriggers |
Array |
Yes |
List of triggers. Each trigger is an associative array, with the following properties: triggerProperties - Mandatory Array with the following properties: "severity" (integer), "trigger_id" triggerConditions - Optional Array of conditions, each condition should have the following list of properties: "condition_id", "operation", "attribute", "operand" triggerActions - Optional Array of actions, each action should have the following list of properties: "action_id", "action_type" (integer), "action_url", "tracing_duration" (integer) |
acceptDuplicate |
Boolean |
No |
When creating a new rule, determines behavior when rule duplication is detected. When TRUE, the duplicate call is accepted as valid and the existing rule is returned. When FALSE, the duplicate call is declined and returns an error. In both cases no changes are performed to the system. Default is FALSE. |
Expected Response Code: 202 Accepted
Response Type: A list of the rule elements that were modified/added
Possible Action Specific Error Codes:
HTTP Code |
Error Code |
Description |
500 |
internalServerError |
The system could not retrieve the requested rules’ information, possibly due to database error |
404 |
noSuchMonitorRule |
The requested rule was not found |
|
Request (headers removed for the purpose of clarity)
Response (not all headers are shown)
|