openapi: "3.0.0" info: version: 1.0.0 title: SensLog Telemetry servers: - url: http://127.0.0.1:8080 paths: /info: get: operationId: infoGET summary: Information about running instance responses: '200': description: Instance information content: application/json: schema: $ref: "#/components/schemas/Info" default: description: unexpected error content: application/json: schema: $ref: "#/components/schemas/Error" /campaigns: get: operationId: campaignAllGET summary: Publish info about all campaigns responses: 200: description: JSON array of basic info of each campaign content: application/json: schema: type: array properties: Campaign@NavigationLink: type: string format: uri id: type: integer format: int64 description: type: string from_time: type: string format: date-time example: "2023-01-25 15:35:32Z" to_time: type: string format: date-time example: Campaign@NavigationLink: "/campaigns/1" id: 1 description: "Campaign example" from_time: "2023-01-25 15:35:32Z" to_time: "2023-03-20 10:35:32Z" default: description: unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /campaigns/{id}: get: operationId: campaignIdGET summary: Publish info about a campaign parameters: - in: path name: id schema: type: integer required: true description: Numeric ID of the campaign to get responses: 200: description: JSON object containing info about a campaign content: application/json: schema: $ref: '#/components/schemas/CampaignInfo' default: description: unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /campaigns/{id}/observations: get: operationId: campaignIdObservationGET summary: Publish last observation from the campaign parameters: - in: path name: id schema: type: integer required: true description: Numeric ID of the campaign to get responses: 200: description: JSON containing telemetry observation of the campaign content: application/json: schema: type: object properties: Campaign@NavigationLink: type: string format: uri data: type: array items: $ref: '#/components/schemas/Observation' default: description: unexpected error content: application/json: schema: $ref: "#/components/schemas/Error" /units/{id}: get: operationId: unitIdGET summary: Publish info about a unit responses: 200: description: JSON object containing info about an unit content: application/json: schema: $ref: '#/components/schemas/UnitInfo' default: description: unexpected error content: application/json: schema: $ref: "#/components/schemas/Error" /units/{id}/observations: get: operationId: unitIdObservationGET summary: Publish last observation from the unit responses: 200: description: JSON containing telemetry observations of the unit content: application/json: schema: type: object properties: Unit@NavigationLink: type: string format: uri data: type: array items: $ref: '#/components/schemas/Observation' default: description: unexpected error content: application/json: schema: $ref: "#/components/schemas/Error" /sensors/{id}: get: operationId: sensorIdGET summary: Publish info about a sensor responses: 200: description: JSON object containing info about a sensor content: application/json: schema: $ref: '#/components/schemas/SensorInfo' default: description: unexpected error content: application/json: schema: $ref: "#/components/schemas/Error" components: schemas: CampaignInfo: type: object required: - id - from_time - to_time - units properties: Observations@NavigationLink: type: string format: uri id: type: integer format: int64 description: type: string from_time: type: string format: date-time to_time: type: string format: date-time units: type: array items: type: object required: - unit_id - Unit@NavigationLink properties: id: type: integer format: int64 Unit@NavigationLink: type: string format: uri example: Observations@NavigationLink: "/campaigns/1/observations" id: 1 description: "Campaign example" from_time: "2023-01-25 15:35:32Z" to_time: "2023-03-20 10:35:32Z" units: [] UnitInfo: type: object required: - unit_id - is_mobile - type - sensors properties: Campaign@NavigationLink: type: string format: uri description: URI link to the assigned campaign id: type: integer format: int64 description: type: string is_mobile: type: boolean type: type: object required: - id - name properties: id: type: string minLength: 1 maxLength: 2 name: type: string maxLength: 20 description: type: string sensors: type: array items: type: object required: - sensor_id - Sensor@NavigationLink properties: sensor_id: type: integer format: int64 Sensor@NavigationLink: type: string format: uri description: URI link to the sensor info SensorInfo: type: object required: - sensor_id - name - type - phenomenon properties: sensor_id: type: integer format: int64 name: type: string type: type: string min_range: type: string max_range: type: string phenomenon: $ref: '#/components/schemas/PhenomenonInfo' PhenomenonInfo: type: object required: - id - name - uom properties: id: type: integer format: int64 name: type: string uom: type: string maxLength: 30 uom_link: type: string format: uri Observation: type: object required: - unit_id - time_stamp - location - observed_values properties: unit_id: type: integer format: int64 time_stamp: type: string format: date-time location: $ref: '#/components/schemas/Location' observed_values: type: object Location: type: object properties: longitude: type: number format: float latitude: type: number format: float altitude: type: number format: float example: longitude: 49.7384 latitude: 13.3736 altitude: 350.3 Info: required: - name - version - build - uptime - uptimeMillis properties: name: type: string version: type: string build: type: string uptimeMillis: type: integer format: int64 uptime: type: string example: name: "senslog-telemetry" version: "1.1.0" build: "123456789" uptimeMillis: 1684862333 uptime: "1:20:00" Error: required: - code - message properties: code: type: integer format: int32 message: type: string example: code: 404 message: "Not Found"