511ce725d70abb5126174052c3c3ed088a45a922
[holmes/engine-management.git] / api / swagger.json
1 {
2   "swagger" : "2.0",
3   "info" : {
4     "description" : "This page shows all the APIs available in the Holmes engine management module.",
5     "version" : "v1",
6     "title" : "API Descriptions for Holmes Engine Management",
7     "termsOfService" : "http://www.github.com/kongchen/swagger-maven-plugin",
8     "contact" : {
9       "name" : "Guangrong Fu",
10       "email" : "fu.guangrong@zte.com.cn"
11     },
12     "license" : {
13       "name" : "Apache 2.0",
14       "url" : "http://www.apache.org/licenses/LICENSE-2.0.html"
15     }
16   },
17   "basePath" : "/api/holmes-engine-mgmt/v1/",
18   "tags" : [ {
19     "name" : "Health Check"
20   }, {
21     "name" : "Holmes Engine Management"
22   } ],
23   "paths" : {
24     "/healthcheck" : {
25       "get" : {
26         "tags" : [ "Health Check" ],
27         "summary" : "Interface for the health check of the engine management module for Holmes",
28         "description" : "",
29         "operationId" : "healthCheck",
30         "produces" : [ "text/plain" ],
31         "responses" : {
32           "200" : {
33             "description" : "successful operation",
34             "schema" : {
35               "type" : "boolean"
36             }
37           }
38         }
39       }
40     },
41     "/rule" : {
42       "post" : {
43         "tags" : [ "Holmes Engine Management" ],
44         "summary" : "Check the validity of a rule.",
45         "description" : "",
46         "operationId" : "compileRule",
47         "produces" : [ "application/json" ],
48         "responses" : {
49           "200" : {
50             "description" : "successful operation",
51             "schema" : {
52               "type" : "boolean"
53             }
54           }
55         }
56       },
57       "put" : {
58         "tags" : [ "Holmes Engine Management" ],
59         "summary" : "Deploy a rule into the Drools engine.",
60         "description" : "",
61         "operationId" : "deployRule",
62         "produces" : [ "application/json" ],
63         "parameters" : [ {
64           "in" : "body",
65           "name" : "body",
66           "description" : "The request entity of the HTTP call, which comprises three fields: \"content\" , \"loopControlName\" and \"engineId\". The \"content\" should be a valid Drools rule string and the \"engineId\" has to be \"engine-d\" in the Beijing release.",
67           "required" : true,
68           "schema" : {
69             "$ref" : "#/definitions/DeployRuleRequest"
70           }
71         } ],
72         "responses" : {
73           "200" : {
74             "description" : "successful operation",
75             "schema" : {
76               "$ref" : "#/definitions/CorrelationRuleResponse"
77             }
78           }
79         }
80       }
81     },
82     "/rule/{packageName}" : {
83       "delete" : {
84         "tags" : [ "Holmes Engine Management" ],
85         "summary" : "Undeploy a rule from the Drools engine.",
86         "description" : "",
87         "operationId" : "undeployRule",
88         "produces" : [ "application/json" ],
89         "parameters" : [ {
90           "name" : "packageName",
91           "in" : "path",
92           "required" : true,
93           "type" : "string"
94         } ],
95         "responses" : {
96           "200" : {
97             "description" : "successful operation",
98             "schema" : {
99               "type" : "boolean"
100             }
101           }
102         }
103       }
104     }
105   },
106   "definitions" : {
107     "CorrelationRuleResponse" : {
108       "type" : "object",
109       "properties" : {
110         "package" : {
111           "type" : "string"
112         }
113       }
114     },
115     "DeployRuleRequest" : {
116       "type" : "object",
117       "required" : [ "content", "loopControlName" ],
118       "properties" : {
119         "content" : {
120           "type" : "string"
121         },
122         "engineId" : {
123           "type" : "string"
124         },
125         "loopControlName" : {
126           "type" : "string"
127         }
128       }
129     }
130   }
131 }