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: - in: header name: X-Auth-Token description: "JWT token to authenticate a content." schema: type: string format: jwt - 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: {}