input-service/api.yaml

151 lines
3.3 KiB
YAML
Raw Normal View History

2020-05-20 22:25:28 +02:00
swagger: "2.0"
info:
description: "This is the input interface of the Birbnetes system."
version: "1.1.0"
title: "Input Service"
contact:
email: "tormakristof@tormakristof.eu"
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "dev.k8s.tcloud.enginner"
basePath: "/api/input/v1"
tags:
- name: "input"
description: "Input Service interaction"
schemes:
- "https"
- "http"
paths:
/sample:
get:
summary: Get all stored input queries
operationId: getall
tags:
- input
responses:
"200":
description: Array of input objects
schema:
$ref: '#/definitions/InputResponse'
"404":
description: No object matching filter
schema:
$ref: '#/definitions/ApiResponse'
post:
tags:
- "input"
summary: "uploads a sample into the system"
description: ""
operationId: "uploadFile"
consumes:
- "multipart/form-data"
produces:
- "application/json"
parameters:
- name: "description"
in: "formData"
description: "JSON"
required: true
type: "string"
format: "date"
- name: "file"
in: "formData"
description: "Wave file to upload"
required: true
type: "file"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/ApiResponse"
415:
description: "Media type error"
schema:
$ref: "#/definitions/ApiResponse"
400:
description: "JSON parse error"
schema:
$ref: "#/definitions/ApiResponse"
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"
/sample/{tagID}:
get:
summary: Get input object 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: input 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"
required:
- status
- message