Update existing rule

PUT {{baseUrl}}/rules/:ruleId

Update the rule with id ruleId. Properties present in the request body are utilized to update the addressed rule. The response contains the updated rule. Attention: Any modification may cause a restart of the rule evaluation.

Request Body

{"name"=>"<string>", "description"=>"<string>", "active"=>"<boolean>", "evaluations"=>[{"property"=>"<string>", "condition"=>"<string>", "hysteresisAbsolute"=>{"active"=>"<boolean>", "value"=>"<number>", "lowerValue"=>"<number>", "upperValue"=>"<number>"}, "debouncingTime"=>{"active"=>"<boolean>", "value"=>"<number>"}, "threshold"=>"<integer>", "lowerLimitThreshold"=>"<number>", "upperLimitThreshold"=>"<number>"}, {"property"=>"<string>", "condition"=>"<string>", "hysteresisAbsolute"=>{"active"=>"<boolean>", "value"=>"<number>", "lowerValue"=>"<number>", "upperValue"=>"<number>"}, "debouncingTime"=>{"active"=>"<boolean>", "value"=>"<number>"}, "threshold"=>"<integer>", "lowerLimitThreshold"=>"<number>", "upperLimitThreshold"=>"<number>"}], "actions"=>{"email"=>{"active"=>"<boolean>", "address"=>"<string>"}, "notifier"=>{"active"=>"<boolean>"}, "status"=>{"active"=>"<boolean>", "severity"=>"<number>"}, "event"=>{"severity"=>"<number>", "limitInterval"=>{"active"=>"<boolean>", "value"=>"<number>"}}}}

HEADERS

KeyDatatypeRequiredDescription
If-Matchstring(Required) etag of the latest version for optimistic locking
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;_embedded&quot;:{&quot;rule&quot;:{&quot;ruleId&quot;:&quot;580a52f638394c8ab35f22f03556a7ed&quot;,&quot;assetType&quot;:&quot;myiottenant.GearBox&quot;,&quot;assetIds&quot;:[&quot;9f81490428644ff995b0e3590f21ef57&quot;,&quot;76a1388fee23496bacac9bc378aa65fe&quot;],&quot;name&quot;:&quot;New awesome rule name&quot;,&quot;description&quot;:&quot;New desription&quot;,&quot;active&quot;:true,&quot;creator&quot;:&quot;\u003cName of user that has initially created the rule\u003e&quot;,&quot;created&quot;:&quot;\u003cDate and time of rule creation\u003e&quot;,&quot;editor&quot;:&quot;\u003cName of user that has last updated the rule configuration\u003e&quot;,&quot;edited&quot;:&quot;\u003cDate and time of last rule update\u003e&quot;,&quot;evaluations&quot;:[{&quot;property&quot;:&quot;/data/GearBoxTemp&quot;,&quot;condition&quot;:&quot;\u003e=&quot;,&quot;hysteresisAbsolute&quot;:{&quot;active&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;value&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;lowerValue&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;upperValue&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}},&quot;debouncingTime&quot;:{&quot;active&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;value&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}},&quot;threshold&quot;:50,&quot;lowerLimitThreshold&quot;:25,&quot;upperLimitThreshold&quot;:75},{&quot;property&quot;:&quot;/data/GearBoxTemp&quot;,&quot;condition&quot;:&quot;\u003e=&quot;,&quot;hysteresisAbsolute&quot;:{&quot;active&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;value&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;lowerValue&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;upperValue&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}},&quot;debouncingTime&quot;:{&quot;active&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;value&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}},&quot;threshold&quot;:50,&quot;lowerLimitThreshold&quot;:25,&quot;upperLimitThreshold&quot;:75}],&quot;actions&quot;:{&quot;email&quot;:{&quot;active&quot;:&quot;\u003cboolean\u003e&quot;,&quot;address&quot;:&quot;user1@example.com;user2@example.com&quot;},&quot;notifier&quot;:{&quot;active&quot;:&quot;\u003cboolean\u003e&quot;},&quot;status&quot;:{&quot;active&quot;:&quot;\u003cboolean\u003e&quot;,&quot;severity&quot;:&quot;\u003cnumber\u003e&quot;},&quot;event&quot;:{&quot;severity&quot;:&quot;\u003cnumber\u003e&quot;,&quot;limitInterval&quot;:{&quot;active&quot;:&quot;\u003cboolean\u003e&quot;,&quot;value&quot;:10}}}}},&quot;quota&quot;:{&quot;active&quot;:31,&quot;total&quot;:50,&quot;limitActive&quot;:70},&quot;message&quot;:&quot;Rule updated&quot;}