From 7e73eb083270643ff4c4841ed6b9de826895acbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Mon, 6 Apr 2020 19:06:04 +0200 Subject: [PATCH] input service newest api --- input.yml | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 88 insertions(+), 5 deletions(-) diff --git a/input.yml b/input.yml index 315f3c5..8527606 100644 --- a/input.yml +++ b/input.yml @@ -1,7 +1,7 @@ swagger: "2.0" info: - description: "This s the input interface of the Birbnetes system." - version: "1.0.10" + description: "This is the input interface of the Birbnetes system." + version: "1.1.0" title: "Input Service" contact: email: "tormakristof@tormakristof.eu" @@ -18,6 +18,21 @@ schemes: - "http" paths: /sample: + get: + summary: Get all stored input queries + operationId: getall + tags: + - input + responses: + "200": + description: Array of decision objects + schema: + $ref: '#/definitions/InputResponse' + "404": + description: No object matching filter + schema: + $ref: '#/definitions/ApiResponse' + post: tags: - "input" @@ -51,7 +66,7 @@ paths: description: "successful operation" schema: $ref: "#/definitions/ApiResponse" - 416: + 415: description: "Media type error" schema: $ref: "#/definitions/ApiResponse" @@ -59,16 +74,84 @@ paths: description: "JSON parse error" schema: $ref: "#/definitions/ApiResponse" - 444: + 417: description: "JSON invalid schema" schema: $ref: "#/definitions/ApiResponse" + 469: + description: "No file found" + schema: + $ref: "#/definitions/ApiResponse" + 470: + description: "Description missing" + schema: + $ref: "#/definitions/ApiResponse" + + /output/{tagID}: + get: + summary: Get decision by ID + operationId: getInput + tags: + - input + parameters: + - name: tagID + in: path + description: ID of input object file + required: true + type: string + format: uuid + responses: + "200": + description: Decision object + schema: + $ref: '#/definitions/InputSingeResponse' + "404": + description: Tag not found + schema: + $ref: '#/definitions/ApiResponse' + definitions: + InputSingeResponse: + type: "object" + properties: + status: + type: "string" + message: + $ref: '#/definitions/InputObject' + required: + - status + - message + + InputResponse: + type: "array" + items: + $ref: "#/definitions/InputObject" + + + InputObject: + type: "object" + properties: + tag: + type: "string" + format: "uuid" + date: + type: "string" + format: "date" + device_id: + type: "integer" + required: + - tag + - date + - device_id + ApiResponse: type: "object" properties: status: type: "string" message: - type: "string" \ No newline at end of file + type: "string" + required: + - status + - message \ No newline at end of file