| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385 |
- 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"
|