95 lines
2.1 KiB
YAML
95 lines
2.1 KiB
YAML
openapi: 3.0.3
|
|
|
|
info:
|
|
title: SinkConvert2
|
|
version: "0.0.1"
|
|
|
|
paths:
|
|
/sc2/v1/entry:
|
|
post:
|
|
tags: [ "entry" ]
|
|
operationId: Entries.insert
|
|
summary: Insert one or more entries into the database
|
|
requestBody:
|
|
description: List of entries
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/entry"
|
|
responses:
|
|
201:
|
|
description: One or more entries has been inserted
|
|
401:
|
|
description: Unauthorized
|
|
404:
|
|
description: Not found
|
|
/sc2/v1/entries:
|
|
get:
|
|
tags: [ "entry" ]
|
|
operationId: Entries.get
|
|
summary: Get entries from the database using a defined filter
|
|
parameters:
|
|
- name: start
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
format: date-time
|
|
- name: stop
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
format: date-time
|
|
- name: location
|
|
in: query
|
|
required: false
|
|
schema:
|
|
type: string
|
|
responses:
|
|
200:
|
|
description: List on selected entries
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/entry"
|
|
401:
|
|
description: Unauthorized
|
|
403:
|
|
description: Access denied
|
|
404:
|
|
description: Not found
|
|
security:
|
|
- jwt: ['secret']
|
|
|
|
|
|
|
|
components:
|
|
securitySchemes:
|
|
jwt:
|
|
type: http
|
|
scheme: bearer
|
|
bearerFormat: JWT
|
|
x-bearerInfoFunc: Auth.decodeToken
|
|
schemas:
|
|
entry:
|
|
description: Entry with timestamp and frequency
|
|
type: object
|
|
required:
|
|
- timestamp
|
|
- frequency
|
|
properties:
|
|
timestamp:
|
|
description: Synchronized timestamp in RFC3339 format in timezone UTC
|
|
type: string
|
|
format: date-time
|
|
frequency:
|
|
description: Frequency in mHz
|
|
type: integer
|
|
|
|
|