2020-07-26 18:22:48 +02:00
|
|
|
openapi: 3.0.3
|
2020-04-07 23:15:11 +02:00
|
|
|
info:
|
2020-07-26 18:22:48 +02:00
|
|
|
title: Model Service
|
|
|
|
description: This is the model-service interface of the Birbnetes system.
|
2020-04-07 23:15:11 +02:00
|
|
|
contact:
|
2020-07-26 18:22:48 +02:00
|
|
|
email: punkosdmarcell@rocketmail.com
|
2020-04-07 23:15:11 +02:00
|
|
|
license:
|
2020-07-26 18:22:48 +02:00
|
|
|
name: Apache 2.0
|
|
|
|
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
2020-07-26 18:40:47 +02:00
|
|
|
version: 1.0.4
|
2020-07-26 18:22:48 +02:00
|
|
|
servers:
|
|
|
|
- url: https://dev.k8s.tcloud.enginner/api/model/v1
|
|
|
|
- url: http://dev.k8s.tcloud.enginner/api/model/v1
|
2020-04-07 23:15:11 +02:00
|
|
|
tags:
|
2020-07-26 18:22:48 +02:00
|
|
|
- name: model
|
|
|
|
description: Model Service definition
|
2020-04-07 23:15:11 +02:00
|
|
|
paths:
|
|
|
|
/model:
|
2020-04-15 03:03:38 +02:00
|
|
|
get:
|
|
|
|
tags:
|
2020-07-26 18:22:48 +02:00
|
|
|
- model
|
|
|
|
summary: Return a brief list of available models
|
|
|
|
description: Returns a brief list of available models
|
|
|
|
operationId: getModelList
|
2020-04-15 03:03:38 +02:00
|
|
|
responses:
|
|
|
|
200:
|
2020-07-26 18:22:48 +02:00
|
|
|
description: A brief list of available models
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/BriefModelDetails'
|
2020-04-07 23:15:11 +02:00
|
|
|
post:
|
|
|
|
tags:
|
2020-07-26 18:22:48 +02:00
|
|
|
- model
|
|
|
|
summary: Uploads a new model into the service
|
|
|
|
operationId: uploadFile
|
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
multipart/form-data:
|
|
|
|
schema:
|
|
|
|
required:
|
|
|
|
- file
|
|
|
|
- info
|
|
|
|
properties:
|
|
|
|
info:
|
2020-07-26 18:40:47 +02:00
|
|
|
type: object
|
|
|
|
description: Json metadata of model
|
|
|
|
properties:
|
|
|
|
type:
|
|
|
|
type: string
|
|
|
|
id:
|
|
|
|
type: string
|
2020-07-26 18:22:48 +02:00
|
|
|
file:
|
|
|
|
type: string
|
2020-07-26 18:40:47 +02:00
|
|
|
description: model itself
|
2020-07-26 18:22:48 +02:00
|
|
|
format: binary
|
2020-04-07 23:15:11 +02:00
|
|
|
required: true
|
|
|
|
responses:
|
|
|
|
201:
|
2020-07-26 18:22:48 +02:00
|
|
|
description: Model successfully stored. This means that a get request for
|
|
|
|
this object should be successful.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ApiResponse'
|
2020-04-07 23:15:11 +02:00
|
|
|
409:
|
2020-07-26 18:22:48 +02:00
|
|
|
description: A model with this Id already exists
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ApiResponse'
|
2020-04-07 23:15:11 +02:00
|
|
|
/model/{modelId}:
|
|
|
|
get:
|
|
|
|
tags:
|
2020-07-26 18:22:48 +02:00
|
|
|
- model
|
|
|
|
summary: Download a model identified by Id
|
|
|
|
description: Returns a single model
|
|
|
|
operationId: getModelById
|
2020-04-07 23:15:11 +02:00
|
|
|
parameters:
|
2020-07-26 18:22:48 +02:00
|
|
|
- name: modelId
|
|
|
|
in: path
|
|
|
|
description: Id of the model to return or `$default` for the default
|
2020-04-07 23:15:11 +02:00
|
|
|
required: true
|
2020-07-26 18:22:48 +02:00
|
|
|
schema:
|
|
|
|
type: string
|
2020-04-07 23:15:11 +02:00
|
|
|
responses:
|
|
|
|
200:
|
2020-07-26 18:22:48 +02:00
|
|
|
description: The requested model
|
2020-07-26 18:40:47 +02:00
|
|
|
content:
|
|
|
|
application/octet-stream: {}
|
2020-04-07 23:15:11 +02:00
|
|
|
404:
|
2020-07-26 18:22:48 +02:00
|
|
|
description: A model with this Id does not exist.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ApiResponse'
|
2020-04-07 23:15:11 +02:00
|
|
|
delete:
|
|
|
|
tags:
|
2020-07-26 18:22:48 +02:00
|
|
|
- model
|
|
|
|
summary: Deletes a model identified by Id
|
|
|
|
operationId: deleteModel
|
2020-04-07 23:15:11 +02:00
|
|
|
parameters:
|
2020-07-26 18:22:48 +02:00
|
|
|
- name: modelId
|
|
|
|
in: path
|
|
|
|
description: Id of the model to delete
|
2020-04-07 23:15:11 +02:00
|
|
|
required: true
|
2020-07-26 18:22:48 +02:00
|
|
|
schema:
|
|
|
|
type: string
|
2020-04-07 23:15:11 +02:00
|
|
|
responses:
|
|
|
|
204:
|
2020-07-26 18:22:48 +02:00
|
|
|
description: Successful deletion
|
|
|
|
content: {}
|
2020-04-07 23:15:11 +02:00
|
|
|
404:
|
2020-07-26 18:22:48 +02:00
|
|
|
description: An model with this Id does not exist.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ApiResponse'
|
2020-04-07 23:15:11 +02:00
|
|
|
/model/$default:
|
|
|
|
put:
|
|
|
|
tags:
|
2020-07-26 18:22:48 +02:00
|
|
|
- model
|
|
|
|
summary: Updates the id of the default model
|
|
|
|
description: It really does
|
|
|
|
operationId: updateDefault
|
|
|
|
requestBody:
|
|
|
|
content:
|
2020-07-26 18:25:01 +02:00
|
|
|
application/json:
|
2020-07-26 18:22:48 +02:00
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: string
|
|
|
|
required: false
|
2020-04-07 23:15:11 +02:00
|
|
|
responses:
|
|
|
|
204:
|
2020-07-26 18:22:48 +02:00
|
|
|
description: Successful update
|
|
|
|
content: {}
|
2020-04-07 23:15:11 +02:00
|
|
|
404:
|
2020-07-26 18:22:48 +02:00
|
|
|
description: The id does not identifies any model
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
|
|
x-codegen-request-body-name: modelId
|
2020-04-07 23:15:11 +02:00
|
|
|
/model/{modelId}/details:
|
|
|
|
get:
|
|
|
|
tags:
|
2020-07-26 18:22:48 +02:00
|
|
|
- model
|
|
|
|
summary: Get the details of the model required for extraction
|
|
|
|
description: Returns a single object representing model details
|
|
|
|
operationId: getModelDetailsById
|
2020-04-07 23:15:11 +02:00
|
|
|
parameters:
|
2020-07-26 18:22:48 +02:00
|
|
|
- name: modelId
|
|
|
|
in: path
|
|
|
|
description: Id of the model to return the details of or `$default` for the
|
|
|
|
default model
|
2020-04-07 23:15:11 +02:00
|
|
|
required: true
|
2020-07-26 18:22:48 +02:00
|
|
|
schema:
|
|
|
|
type: string
|
2020-04-07 23:15:11 +02:00
|
|
|
responses:
|
|
|
|
200:
|
2020-07-26 18:22:48 +02:00
|
|
|
description: The details of the requested model.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ModelDetails'
|
2020-04-07 23:15:11 +02:00
|
|
|
404:
|
2020-07-26 18:22:48 +02:00
|
|
|
description: A model with this id does not exist.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
|
|
components:
|
|
|
|
schemas:
|
|
|
|
ApiResponse:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
status:
|
|
|
|
type: string
|
|
|
|
msg:
|
|
|
|
type: string
|
|
|
|
BriefModelDetails:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: string
|
|
|
|
default:
|
|
|
|
type: boolean
|
|
|
|
ModelDetails:
|
|
|
|
type: object
|
2020-04-15 03:03:38 +02:00
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: string
|
2020-07-26 18:22:48 +02:00
|
|
|
timestamp:
|
|
|
|
type: string
|
2020-04-15 03:03:38 +02:00
|
|
|
default:
|
|
|
|
type: boolean
|
2020-07-26 18:22:48 +02:00
|
|
|
mid_window:
|
|
|
|
type: number
|
|
|
|
mid_step:
|
|
|
|
type: number
|
|
|
|
short_window:
|
|
|
|
type: number
|
|
|
|
short_step:
|
|
|
|
type: number
|
|
|
|
compute_beat:
|
|
|
|
type: boolean
|
|
|
|
type:
|
|
|
|
type: string
|