| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231 |
- openapi: 3.0.3
- info:
- title: SensLog 2.0
- version: 1.0.0
- externalDocs:
- description: Find out more about SensLog
- url: http://senslog.org
- servers:
- - url: http://localhost:8080/senslog/api
- tags:
- - name: "Version 1"
- description: "Origin version of public API"
- - name: "Version 2"
- description: "New version of public API"
- paths:
- /v1/FeederServlet:
- post:
- tags:
- - Version 1
- operationId: insertionToSenslog
- parameters:
- - name: Operation
- in: query
- required: true
- schema:
- type: string
- enum:
- - InsertObservation
- - InsertPosition
- - InsertAlertEvent
- - SolvingAlertEvent
- - name: unit_id
- in: query
- description: "Identifier of unit. Avaliable only for operation types: [InsertObservation, InsertPosition]"
- schema:
- type: integer
- format: int64
- - name: sensor_id
- in: query
- description: "Identifier of sensor. Avaliable only for operation types: [InsertObservation]"
- schema:
- type: integer
- format: int64
- - name: date
- in: query
- description: "Timestamp of measured value (e.g. 2015-07-15 12:00:00+0200). Avaliable only for operation types: [InsertObservation, InsertPosition]"
- schema:
- type: string
- - name: value
- in: query
- description: "Measured value. Avaliable only for operation types: [InsertObservation]"
- schema:
- type: number
- format: double
- - name: lat
- in: query
- description: "Latitude of position. Avaliable only for operation types: [InsertPosition]"
- schema:
- type: number
- format: double
- - name: lon
- in: query
- description: "Longitude of position. Avaliable only for operation types: [InsertPosition]"
- schema:
- type: number
- format: double
- - name: alt
- in: query
- description: "Altitude of position in meters. Avaliable only for operation types: [InsertPosition]"
- schema:
- type: number
- format: double
- - name: speed
- in: query
- description: "Speed of the unit. Avaliable only for operation types: [InsertPosition]"
- schema:
- type: number
- format: double
- - name: dop
- in: query
- description: "Dilution of precision. Avaliable only for operation types: [InsertPosition]"
- schema:
- type: integer
- format: int32
- responses:
- 200:
- description: "Successfull operation."
- content:
- text/plain:
- schema:
- type: boolean
- 400:
- description: "Invalid parameter value."
- content:
- text/plain:
- schema:
- type: object
- properties:
- timestamp:
- type: integer
- description: "Epoch time"
- example: 1609459200
- message:
- type: string
- description: "Description of failure."
- example: "Parameter 'unit_id' is not a number."
- 406:
- description: Invalid operation type
- content:
- text/plain:
- schema:
- type: object
- properties:
- timestamp:
- type: integer
- description: "Epoch time"
- example: 1609459200
- message:
- type: string
- description: "Description of failture."
- example: "Unsupported operation 'WrongOperation'."
- /v1/SensorService:
- get:
- tags:
- - Version 1
- operationId: sensorService
- parameters:
- - name: Operation
- in: query
- required: true
- schema:
- type: string
- enum:
- - GetLastObservations
- - GetSensors
- - GetObservations
- - name: group
- in: query
- description: "Name of group of units. Can be used with 'sensor_id' parameter. Avaliable only for operation types: [GetLastObservations]"
- schema:
- type: string
- - name: unit_id
- in: query
- description: "Identifier of unit. Can be used with 'sensor_id' parameter. Avaliable only for operation types: [GetLastObservations]"
- schema:
- type: integer
- format: int64
- - name: sensor_id
- in: query
- description: "Identifier of sensor.\n Avaliable only for operation types: [GetLastObservations]"
- schema:
- type: integer
- format: int64
- responses:
- 200:
- description: "List of observations."
- content:
- application/json:
- schema:
- type: array
- items:
- type: object
- properties:
- unit_id:
- type: integer
- format: int64
- example: 1230000
- sensor_id:
- type: integer
- format: int64
- example: 2830001
- value:
- type: number
- format: double
- example: 0.3453
- time_stamp:
- type: string
- example: "2021-03-15 12:00:00+02"
- 400:
- description: "Invalid parameter value."
- content:
- application/json:
- schema:
- type: object
- properties:
- timestamp:
- type: integer
- description: "Epoch time"
- example: 1609459200
- message:
- type: string
- description: "Description of failture."
- example: "Parameter 'unit_id' is not a number."
- 406:
- description: "Invalid operation type"
- content:
- application/json:
- schema:
- type: object
- properties:
- timestamp:
- type: integer
- description: "Epoch time"
- example: 1609459200
- message:
- type: string
- description: "Description of failture."
- example: "Unsupported operation 'WrongOperation'."
- /info:
- get:
- tags:
- - "Version 2"
- operationId: info
- responses:
- 200:
- description: "General information about running server."
- content:
- application/json:
- schema:
- type: object
- properties:
- uptime:
- type: string
- example: "10 min 05 sec"
- appVersion:
- type: string
- example: "1.3.5"
- buildVersion:
- type: string
- example: "1609459200"
- components: {}
|