2020-07-26 18:40:47 +02:00
|
|
|
openapi: 3.0.3
|
2020-03-17 17:07:51 +01:00
|
|
|
info:
|
2020-07-26 18:40:47 +02:00
|
|
|
title: Storage Service
|
|
|
|
description: This is the internal storage interface of the Birbnetes system.
|
2020-03-28 00:10:53 +01:00
|
|
|
contact:
|
2020-07-26 18:40:47 +02:00
|
|
|
email: tormakristof@tormakristof.eu
|
2020-03-28 00:10:53 +01:00
|
|
|
license:
|
2020-07-26 18:40:47 +02:00
|
|
|
name: Apache 2.0
|
|
|
|
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
|
|
|
version: 1.1.4
|
|
|
|
servers:
|
2020-09-30 01:27:34 +02:00
|
|
|
- url: https://birb.k8s.kmlabz.com
|
2020-03-28 00:10:53 +01:00
|
|
|
tags:
|
2020-07-26 18:40:47 +02:00
|
|
|
- name: storage
|
|
|
|
description: Storage Service definition
|
2020-03-17 17:07:51 +01:00
|
|
|
paths:
|
|
|
|
/object:
|
|
|
|
post:
|
2020-03-28 00:10:53 +01:00
|
|
|
tags:
|
2020-07-26 18:40:47 +02:00
|
|
|
- storage
|
|
|
|
summary: Uploads an object into the service
|
|
|
|
operationId: uploadFile
|
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
multipart/form-data:
|
|
|
|
schema:
|
|
|
|
required:
|
|
|
|
- description
|
|
|
|
- soundFile
|
|
|
|
properties:
|
|
|
|
description:
|
|
|
|
type: object
|
|
|
|
description: Metadata JSON
|
|
|
|
properties:
|
|
|
|
tag:
|
|
|
|
type: string
|
|
|
|
soundFile:
|
|
|
|
type: string
|
|
|
|
description: Wave file to upload
|
|
|
|
format: binary
|
2020-03-28 00:10:53 +01:00
|
|
|
required: true
|
2020-03-17 17:07:51 +01:00
|
|
|
responses:
|
2020-03-28 00:10:53 +01:00
|
|
|
200:
|
2020-07-26 18:40:47 +02:00
|
|
|
description: Object successfully stored. This means that a get request for
|
|
|
|
this object should be successful.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ApiResponse'
|
2020-03-28 00:10:53 +01:00
|
|
|
409:
|
2020-07-26 18:40:47 +02:00
|
|
|
description: An object with this Tag already exists
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ApiResponse'
|
2020-03-28 00:10:53 +01:00
|
|
|
/object/{objectTag}:
|
2020-03-25 01:36:49 +01:00
|
|
|
get:
|
2020-03-28 00:10:53 +01:00
|
|
|
tags:
|
2020-07-26 18:40:47 +02:00
|
|
|
- storage
|
|
|
|
summary: Download a wave file identified by Tag
|
|
|
|
description: Returns a single pet
|
|
|
|
operationId: getPetById
|
2020-03-25 01:36:49 +01:00
|
|
|
parameters:
|
2020-07-26 18:40:47 +02:00
|
|
|
- name: objectTag
|
|
|
|
in: path
|
|
|
|
description: Tag of wave file to return
|
2020-03-28 00:10:53 +01:00
|
|
|
required: true
|
2020-07-26 18:40:47 +02:00
|
|
|
schema:
|
|
|
|
type: string
|
2020-03-25 01:36:49 +01:00
|
|
|
responses:
|
2020-03-28 00:10:53 +01:00
|
|
|
200:
|
2020-07-26 18:40:47 +02:00
|
|
|
description: The requested audio file.
|
|
|
|
content: {}
|
2020-03-28 00:10:53 +01:00
|
|
|
404:
|
2020-07-26 18:40:47 +02:00
|
|
|
description: An object with this Tag does not exist.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
|
|
audio/wave:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ApiResponse'
|
2020-03-25 01:36:49 +01:00
|
|
|
delete:
|
2020-03-28 00:10:53 +01:00
|
|
|
tags:
|
2020-07-26 18:40:47 +02:00
|
|
|
- storage
|
|
|
|
summary: Deletes a wave file identified by Tag
|
|
|
|
operationId: deleteWave
|
2020-03-25 01:36:49 +01:00
|
|
|
parameters:
|
2020-07-26 18:40:47 +02:00
|
|
|
- name: objectTag
|
|
|
|
in: path
|
|
|
|
description: Tag of wave file to delete
|
2020-03-28 00:10:53 +01:00
|
|
|
required: true
|
2020-07-26 18:40:47 +02:00
|
|
|
schema:
|
|
|
|
type: string
|
2020-03-25 01:36:49 +01:00
|
|
|
responses:
|
2020-03-28 00:10:53 +01:00
|
|
|
200:
|
2020-07-26 18:40:47 +02:00
|
|
|
description: Successful deletion
|
|
|
|
content: {}
|
2020-03-28 00:10:53 +01:00
|
|
|
404:
|
2020-07-26 18:40:47 +02:00
|
|
|
description: An object with this Tag does not exist.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
|
|
components:
|
|
|
|
schemas:
|
|
|
|
ApiResponse:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
status:
|
|
|
|
type: string
|
|
|
|
msg:
|
|
|
|
type: string
|