Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
OperationCreating a Rule
URLapi/holmes-rule-mgmt/v1/rule
MethodPUT
Request
Message TypeJSON String
Message

{

"rulenameruleName": "Alarm Compression",

"loopcontrolnameloopControlName": "Control Loop Name",

"description": "This is the description of the rule.",

"content": "template header\n ruleId\n package packageName...",

"enabled": 0

}

Field Name

Mandatory

Data Type

Default Value

Description

rulenameruleNameYstring
the name of the rule
loopcontrolnameloopControlNameYstring
the control loop name which is generated by CLAMP.
descriptionNstring
the description of the rule which helps the users to tell one rule from another
contentYstring
the content of the rule which should be fully in compliance with the grammatical regulations of Drools
enabledYinteger
0 or 1 which stands for "disabled" and "enabled" respectively
Response
Success Code200
Error Code499
Message on Success

 {

"ruleidruleId": "ruleid0281721"

}

Message on Error

{

"code": 499,

"message": "The detailed error message is displayed here."

}

Field Name

Description

ruleidruleIdthe ruleid returned from the server
codethe error code returned from the server
messagethe detailed message if any error occurs

...