Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
Operation | Creating a Rule |
---|
URL | api/correlation-mgt/v1/rule |
---|
Method | PUT |
---|
Request | Message Type | JSON 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 |
---|
rulename | Y | string | | the name of the rule | description | N | string | | the description of the rule which helps the users to tell one rule from another | content | Y | string | | the content of the rule which should be fully in compliance with the grammatical regulations of Drools | enabled | Y | integer | | 0 or 1 which stands for "disabled" and "enabled" respectively |
|
---|
Response | Success Code | 200 |
---|
Error Code | 499 |
---|
Message on Success | { "ruleid": "ruleid0281721" } |
---|
Message on Error | { "code": 499, "message": "The detailed error message is displayed here." } |
---|
Field Name | Description |
---|
ruleid | the ruleid returned from the server | code | the error code returned from the server | message | the detailed message if any error occurs |
|
---|
Operation | Modifying a Rule |
---|
URL | api/correlation-mgt/v1/rule |
---|
Method | POST |
---|
Request | Message Type | JSON 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 |
---|
ruleid | Y | string | | the id of the rule which is being edited | description | N | string | | the description of the rule which helps the users to tell one rule from another | content | Y | string | | the content of the rule which should be fully in compliance with the grammatical regulations of Drools | enabled | Y | integer | | 0 or 1 which stands for "disabled" and "enabled" respectively |
|
---|
Response | Success Code | 200 |
---|
Error Code | 499 |
---|
Message on Success | { "ruleid": "ruleid0281721" } |
---|
Message on Error | { "code": 499, "message": "The detailed error message is displayed here." } |
---|
Field Name | Description |
---|
ruleid | the ruleid returned from the server | code | the error code returned from the server | message | the detailed message if any error occurs |
|
---|
Operation | Deleting a Rule |
---|
URL | api/correlation-mgt/v1/rule |
---|
Method | DELETE |
---|
Request | Message Type | JSON String |
---|
Message | { “ruleid": "ruleid0937261" } |
---|
Field Name | Mandatory | Data Type | Default Value | Description |
---|
ruleid | Y | string | | the id of the rule which is to be deleted |
|
---|
Response | Success Code | 200 |
---|
Error Code | 499 |
---|
Message on Success | none |
---|
Message on Error | { "code": 499, "message": "The detailed error message is displayed here." } |
---|
Field Name | Description |
---|
code | the error code returned from the server | message | the detailed message if any error occurs |
|
---|
Operation | Querying Rules |
---|
URL | api/correlation-mgt/v1/rule |
---|
Method | GET |
---|
Request | Message Type | JSON String |
---|
Message | { “ruleid": "ruleid0937261", "rulename": "Alarm Compression", "enabled": 0 } |
---|
Field Name | Mandatory | Data Type | Default Value | Description |
---|
ruleid | N | string | | the id of the rule which is to be deleted | rulename | N | string | | the name of the rule | enabled | N | integer | | 0 or 1 which stands for "disabled" and "enabled" respectively. Both enabled and disabled rules will be returned if it's empty. |
|
---|
Response | Success Code | 200 |
---|
Error Code | 499 |
---|
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 |
---|
rules | an array contains all the rules which fulfill the query criteria | totalcount | the number of the rules which fulfill the query criteria | ruleid | the id of the rule | rulename | the name of the rule | description | the description of the rule which helps the users to tell one rule from another | content | the content of the rule which should be fully in compliance with the grammatical regulations of Drools | createtime | the time when the rule is created | creator | the id of the creator of the rule | updatetime | the time of the last modification | modifier | the id of the last user who has modified the rule | enabled | 0 or 1 which stands for "disabled" and "enabled" respectively | code | the error code returned from the server | message | the detailed message if any error occurs |
|
---|