Versions Compared

Key

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

{

"rulename": "Alarm Compression",

"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
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/
correlation
holmes-rule-
mgt
mgmt/v1/rule
MethodPOST
Request
Message TypeJSON String
Message

{

“ruleid": "ruleid0937261",

"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
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
OperationDeleting a Rule
URLapi/
correlation
holmes-rule-
mgt
mgmt/v1/rule
MethodDELETE
Request
Message TypeJSON String
Message

{

“ruleid": "ruleid0937261"

}

Field Name

Mandatory

Data Type

Default Value

Description

ruleidYstring
 

the id of the rule which is to be deleted
Response
Success Code200
Error Code499
Message on Success

none

Message on Error

{

"code": 499,

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

}

Field Name

Description

codethe error code returned from the server
messagethe detailed message if any error occurs
OperationQuerying Rules
URLapi/
correlation
holmes-rule-
mgt
mgmt/v1/rule
MethodGET
Request
Message TypeJSON String
Message

{

“ruleid": "ruleid0937261",

"rulename": "Alarm Compression",

"enabled": 0

}

Field Name

Mandatory

Data Type

Default Value

Description

ruleidNstring
 

the id of the rule which is to be deleted
rulenameNstring
 

the name of the rule
enabledNinteger
 

0 or 1 which stands for "disabled" and "enabled" respectively. Both enabled and disabled rules will be returned if it's empty.
Response
Success Code200
Error Code499
Message on Success

 {

"rules": [

{

"ruleid": "ruleid098271",

"rulename": "Alarm Compression",

"description": "The description of the rule.",

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

 "createtime": 1484188925231,

"creator": "admin",

"updatetime": 1485188925231,

"modifier": "user1",

"enabled": 0

}

],

"totalcount": 1

}

Message on Error

{

"code": 499,

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

}

Field Name

Description

rulesan array contains all the rules which fulfill the query criteria
totalcountthe number of the rules which fulfill the query criteria
ruleidthe id of the rule
rulenamethe name of the rule
descriptionthe description of the rule which helps the users to tell one rule from another
contentthe content of the rule which should be fully in compliance with the grammatical regulations of Drools
createtimethe time when the rule is created
creatorthe id of the creator of the rule
updatetimethe time of the last modification
modifierthe id of the last user who has modified the rule
enabled0 or 1 which stands for "disabled" and "enabled" respectively
codethe error code returned from the server
messagethe detailed message if any error occurs