From 2bc21cc9a4f0e7810449b692587608af1762932c Mon Sep 17 00:00:00 2001 From: Huabing Zhao Date: Sat, 2 Jun 2018 10:15:54 +0800 Subject: Release note Add release note for Beijing. Change-Id: I27c892c181bb5ca50843adefcb7d5b13dcdb1781 Issue-ID: HOLMES-136,DOC-271 Signed-off-by: Huabing Zhao --- api/swagger.json | 242 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 api/swagger.json (limited to 'api/swagger.json') diff --git a/api/swagger.json b/api/swagger.json new file mode 100644 index 0000000..ce9a693 --- /dev/null +++ b/api/swagger.json @@ -0,0 +1,242 @@ +{ + "swagger" : "2.0", + "info" : { + "description" : "This page shows all the APIs available in the Holmes rule management module.", + "version" : "v1", + "title" : "API Descriptions for Holmes Rule 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-rule-mgmt/v1/", + "tags" : [ { + "name" : "Health Check" + }, { + "name" : "Holmes Rule Management" + } ], + "paths" : { + "/healthcheck" : { + "get" : { + "tags" : [ "Health Check" ], + "summary" : "Interface for the health check of the rule management module for Holmes", + "description" : "", + "operationId" : "healthCheck", + "produces" : [ "text/plain" ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "boolean" + } + } + } + } + }, + "/rule" : { + "get" : { + "tags" : [ "Holmes Rule Management" ], + "summary" : "Query rules using certain criteria.", + "description" : "", + "operationId" : "getCorrelationRules", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "queryrequest", + "in" : "query", + "description" : "A JSON string used as a query parameter, which comprises \"ruleId\"(optional), \"ruleName\"(optional), \"creator\"(optional), \"modifier\"(optional) and \"enabled\"(optional). E.g. {\"ruleId\":\"rule_1484727187317\"}", + "required" : false, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/RuleQueryListResponse" + } + } + } + }, + "post" : { + "tags" : [ "Holmes Rule Management" ], + "summary" : "Update an existing rule; deploy it to the Drools engine if it is enabled.", + "description" : "", + "operationId" : "updateCorrelationRule", + "produces" : [ "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "The request entity of the HTTP call, which comprises \"ruleId\"(required), \"content\"(required), \"enabled\"(required) and \"description\"(optional)", + "required" : true, + "schema" : { + "$ref" : "#/definitions/RuleUpdateRequest" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/RuleAddAndUpdateResponse" + } + } + } + }, + "put" : { + "tags" : [ "Holmes Rule Management" ], + "summary" : "Save a rule into the database; deploy it to the Drools engine if it is enabled.", + "description" : "", + "operationId" : "addCorrelationRule", + "produces" : [ "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "The request entity of the HTTP call, which comprises \"ruleName\"(required), \"loopControlName\"(required), \"content\"(required), \"enabled\"(required) and \"description\"(optional)", + "required" : true, + "schema" : { + "$ref" : "#/definitions/RuleCreateRequest" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/RuleAddAndUpdateResponse" + } + } + } + } + }, + "/rule/{ruleId}" : { + "delete" : { + "tags" : [ "Holmes Rule Management" ], + "summary" : "Remove a rule from Holmes.", + "description" : "", + "operationId" : "deleteCorrelationRule", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "ruleId", + "in" : "path", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "boolean" + } + } + } + } + } + }, + "definitions" : { + "RuleAddAndUpdateResponse" : { + "type" : "object", + "properties" : { + "ruleId" : { + "type" : "string" + } + } + }, + "RuleCreateRequest" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "content" : { + "type" : "string" + }, + "enabled" : { + "type" : "integer", + "format" : "int32" + }, + "ruleName" : { + "type" : "string" + }, + "loopControlName" : { + "type" : "string" + } + } + }, + "RuleQueryListResponse" : { + "type" : "object", + "properties" : { + "correlationRules" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/RuleResult4API" + } + }, + "totalCount" : { + "type" : "integer", + "format" : "int32" + } + } + }, + "RuleResult4API" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "content" : { + "type" : "string" + }, + "creator" : { + "type" : "string" + }, + "modifier" : { + "type" : "string" + }, + "enabled" : { + "type" : "integer", + "format" : "int32" + }, + "ruleId" : { + "type" : "string" + }, + "ruleName" : { + "type" : "string" + }, + "createtime" : { + "type" : "string", + "format" : "date-time" + }, + "updatetime" : { + "type" : "string", + "format" : "date-time" + }, + "loopControlName" : { + "type" : "string" + } + } + }, + "RuleUpdateRequest" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "content" : { + "type" : "string" + }, + "enabled" : { + "type" : "integer", + "format" : "int32" + }, + "ruleId" : { + "type" : "string" + }, + "loopControlName" : { + "type" : "string" + } + } + } + } +} \ No newline at end of file -- cgit 1.2.3-korg