Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

OperationQuerying Rules
URLapi/holmes-rule-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

 {

"rulescorrelationRules": [

{

"ruleidruleId": "ruleid098271",

"rulenameruleName": "Alarm Compression",

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

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

 "createtimecreateTime": 1484188925231,

"creator": "admin",

"updatetimeupdateTime": 1485188925231,

"modifier": "user1",

"enabled": 0

}

],

"totalcounttotalCount": 1

}

Message on Error

{

"code": 499,

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

}

Field Name

Description

rulescorrelationRulesan array contains all the rules which fulfill the query criteria
totalcounttotalCountthe number of the rules which fulfill the query criteria
ruleidruleIdthe id of the rule
rulenameruleNamethe 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
createtimecreateTimethe time when the rule is created
creatorthe id of the creator of the rule
updatetimeupdateTimethe 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