summaryrefslogtreecommitdiffstats
path: root/swagger.json
diff options
context:
space:
mode:
Diffstat (limited to 'swagger.json')
-rw-r--r--swagger.json96
1 files changed, 96 insertions, 0 deletions
diff --git a/swagger.json b/swagger.json
new file mode 100644
index 0000000..364bcd3
--- /dev/null
+++ b/swagger.json
@@ -0,0 +1,96 @@
+swagger: "2.0"
+info:
+ description: "API reference for Distributed Key Value store."
+ version: "1.0.0"
+ title: "API reference for Distributed Key Value store"
+ contact:
+ email: "shashank.kumar.shankar@intel.com"
+ url: "https://wiki.onap.org/display/DW/Distributed+KV+Store"
+ license:
+ name: "Apache 2.0"
+ url: "http://www.apache.org/licenses/LICENSE-2.0.html"
+basePath: "/v1"
+schemes:
+- "http"
+paths:
+ /loadconfigs:
+ post:
+ tags:
+ - "load configuration"
+ summary: "Load Key Values by reading configs into Consul"
+ description: ""
+ consumes:
+ - "application/json"
+ produces:
+ - "application/json"
+ parameters:
+ - in: "body"
+ name: "body"
+ description: "Load configuration from file system to be added into Consul"
+ required: true
+ schema:
+ $ref: "#/definitions/LoadRequest"
+ responses:
+ 200:
+ description: "successful operation"
+ schema:
+ $ref: "#/definitions/LoadResponse"
+ /getconfigs:
+ get:
+ tags:
+ - "get all keys"
+ summary: "Get all keys present in Consul."
+ description: "Returns a list of keys present in Consul."
+ produces:
+ - "application/json"
+ responses:
+ 200:
+ description: "successful operation"
+ schema:
+ $ref: "#/definitions/Gets"
+ /getconfig/{key}:
+ get:
+ tags:
+ - "get single key"
+ summary: "Get value for specific key present in Consul."
+ description: "Returns a key and value present in Consul."
+ produces:
+ - "application/json"
+ parameters:
+ - name: "key"
+ in: "path"
+ description: "Key used to query"
+ required: true
+ type: "string"
+ responses:
+ 200:
+ description: "successful operation"
+ schema:
+ $ref: "#/definitions/Get"
+definitions:
+ LoadRequest:
+ type: "object"
+ properties:
+ type:
+ $ref: "#/definitions/Type"
+ Type:
+ type: "object"
+ properties:
+ file_path:
+ type: "string"
+ LoadResponse:
+ type: "object"
+ properties:
+ response:
+ type: "string"
+ Gets:
+ type: "object"
+ properties:
+ response:
+ items:
+ type: "string"
+ Get:
+ type: "object"
+ properties:
+ response:
+ type: "string"