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

{

"rulename": "Alarm Compression",

"loopcontrolname": "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

rulenameYstring
the name of the rule
loopcontrolnameYstring
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

 {

"ruleid": "ruleid0281721"

}

Message on Error

{

"code": 499,

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

}

Field Name

Description

ruleidthe ruleid returned from the server
codethe error code returned from the server
messagethe detailed message if any error occurs
OperationModifying a Rule
URLapi/holmes-rule-mgmt/v1/rule
MethodPOST
Request
Message TypeJSON String
Message

{

“ruleid": "ruleid0937261",

"loopcontrolname": "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

ruleidYstring
the id of the rule which is being edited
loopcontrolnameYstring
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

 {

"ruleid": "ruleid0281721"

}

Message on Error

{

"code": 499,

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

}

Field Name

Description

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

...