200 lines
4.9 KiB
YAML
200 lines
4.9 KiB
YAML
openapi: 3.0.3
|
|
info:
|
|
title: Sample Service
|
|
description: This is the feature extraction interface of the Birbnetes system.
|
|
contact:
|
|
email: tormakristof@tormakristof.eu
|
|
license:
|
|
name: Apache 2.0
|
|
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
|
version: 1.0.0
|
|
servers:
|
|
- url: https://birb.k8s.kmlabz.com
|
|
tags:
|
|
- name: sample
|
|
description: Sample Service interaction
|
|
paths:
|
|
/sample:
|
|
get:
|
|
tags:
|
|
- sample
|
|
summary: Get all sample objects
|
|
operationId: getall
|
|
responses:
|
|
200:
|
|
description: Array of sample objects
|
|
content:
|
|
'application/JSON':
|
|
schema:
|
|
$ref: '#/components/schemas/ResultObjects'
|
|
404:
|
|
description: No object matching filter
|
|
content:
|
|
'application/JSON':
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
/sample/count:
|
|
get:
|
|
tags:
|
|
- sample
|
|
summary: Get number of sample objects
|
|
operationId: getcount
|
|
responses:
|
|
200:
|
|
description: Number of sample objects
|
|
content:
|
|
'application/JSON':
|
|
schema:
|
|
$ref: '#/components/schemas/Count'
|
|
/sample/page/{pageNum}:
|
|
get:
|
|
tags:
|
|
- sample
|
|
summary: Get sample objects (paginated, filter is always 10)
|
|
operationId: getpage
|
|
parameters:
|
|
- name: pageNum
|
|
in: path
|
|
description: Number of page
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
minimum: 0
|
|
responses:
|
|
200:
|
|
description: Array of sample objects
|
|
content:
|
|
'application/JSON':
|
|
schema:
|
|
$ref: '#/components/schemas/ResultObjects'
|
|
/sample/after/{dateAfter}:
|
|
get:
|
|
tags:
|
|
- sample
|
|
summary: Get sample before a date
|
|
operationId: getallafter
|
|
parameters:
|
|
- name: dateAfter
|
|
in: path
|
|
description: Date of filter
|
|
required: true
|
|
schema:
|
|
type: string
|
|
format: date
|
|
responses:
|
|
200:
|
|
description: Array of sample objects
|
|
content:
|
|
'application/JSON':
|
|
schema:
|
|
$ref: '#/components/schemas/ResultObjects'
|
|
404:
|
|
description: No object matching filter
|
|
content:
|
|
'application/JSON':
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
/sample/before/{dateBefore}:
|
|
get:
|
|
tags:
|
|
- sample
|
|
summary: Get sample before a date
|
|
operationId: getallbefore
|
|
parameters:
|
|
- name: dateBefore
|
|
in: path
|
|
description: Date of filter
|
|
required: true
|
|
schema:
|
|
type: string
|
|
format: date
|
|
responses:
|
|
200:
|
|
description: Array of sample objects
|
|
content:
|
|
'application/JSON':
|
|
schema:
|
|
$ref: '#/components/schemas/ResultObjects'
|
|
404:
|
|
description: NO objects matching filter
|
|
content:
|
|
'application/JSON':
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
/sample/device_id/{deviceId}:
|
|
get:
|
|
tags:
|
|
- sample
|
|
summary: Get sample of device
|
|
operationId: getsampledevice
|
|
parameters:
|
|
- name: deviceId
|
|
in: path
|
|
description: Device id
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
responses:
|
|
200:
|
|
description: Array of sample objects
|
|
content:
|
|
'application/JSON':
|
|
schema:
|
|
$ref: '#/components/schemas/ResultObjects'
|
|
404:
|
|
description: NO objects matching filter
|
|
content:
|
|
'application/JSON':
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
/sample/{tagID}:
|
|
get:
|
|
tags:
|
|
- sample
|
|
summary: Get sample by ID
|
|
operationId: getsampleid
|
|
parameters:
|
|
- name: tagID
|
|
in: path
|
|
description: ID of wave file
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
format: int32
|
|
responses:
|
|
200:
|
|
description: sample object
|
|
content:
|
|
'application/JSON':
|
|
schema:
|
|
$ref: '#/components/schemas/ResultObject'
|
|
404:
|
|
description: Tag not found
|
|
content:
|
|
'application/JSON':
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
components:
|
|
schemas:
|
|
ResultObjects:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/ResultObject'
|
|
ResultObject:
|
|
type: object
|
|
properties:
|
|
tag:
|
|
type: string
|
|
probability:
|
|
type: number
|
|
ApiResponse:
|
|
type: object
|
|
properties:
|
|
status:
|
|
type: string
|
|
message:
|
|
type: string
|
|
Count:
|
|
type: integer
|
|
properties:
|
|
minimum: 0 |