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