Merge branch 'main' of github.com:projecthorus/sondehub-infra into main

This commit is contained in:
Michaela 2021-04-05 13:53:09 +10:00
commit b26cb0c833

View File

@ -16,7 +16,7 @@ schemes:
paths: paths:
/sondes/telemetry: /sondes/telemetry:
put: put:
summary: Adds decoded telemetry to Sondehub bus / database. summary: Upload Radiosonde Telemetry to Sondehub database.
consumes: consumes:
- "application/json" - "application/json"
produces: produces:
@ -24,7 +24,7 @@ paths:
parameters: parameters:
- in: header - in: header
name: Date name: Date
description: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT as per RFC7231. This is used to calculate receiver time offset for correcting clients that have the incorrect time. description: <day-name>, <day> <month> <year> <hour>:<minute>:<second> UTC as per RFC7231. This is used to calculate receiver time offset for correcting clients that have the incorrect time.
required: true required: true
type: string type: string
format: date-time format: date-time
@ -38,17 +38,19 @@ paths:
responses: responses:
200: 200:
description: Telemetry logged description: Telemetry Saved into Database Successfuly
500:
description: Other Server error (including malformed data submissions)
get: get:
summary: Gets telemetry data from sondes summary: Request Radiosonde Telemetry Data
description: > description: >
Do not regularly poll this endpoint, it is rate limited. Use this to get the current state of all the radiosondes then use the realtime API to access streaming data. Use this to get the current state of all the radiosondes then use the realtime API to access streaming data. Do not regularly poll this endpoint, it is rate limited.
produces: produces:
- "application/json" - "application/json"
parameters: parameters:
- in: query - in: query
name: duration name: duration
description: This is the max duration of time you'll receive data from. A lower value will result is higher resolution data. description: How far back in time to receive data from. A shorter time period will result is higher time resolution data.
required: false required: false
type: string type: string
enum: enum:
@ -58,12 +60,12 @@ paths:
- "3d" - "3d"
- in: query - in: query
name: serial name: serial
description: Specific serial under description: Specific serial number to query (if wanted). Requests for data for a single sonde will return the highest time resolution data available.
required: false required: false
type: string type: string
- in: query - in: query
name: datetime name: datetime
description: "End time to query. Defaults to now. Example: `2021-02-02T11:27:38.634Z`" description: "End time to query as an ISO-8601 time string. Defaults to now. Example: `2021-02-02T11:27:38.634Z`"
required: false required: false
type: string type: string
format: date-time format: date-time
@ -75,7 +77,7 @@ paths:
$ref: "#/definitions/sonde_query_results_format" $ref: "#/definitions/sonde_query_results_format"
/sondes: /sondes:
get: get:
summary: Gets latest sonde data indexed by serial number. summary: Request latest sonde data indexed by serial number, with options for position/distance based-filtering.
produces: produces:
- "application/json" - "application/json"
parameters: parameters:
@ -103,21 +105,21 @@ paths:
$ref: "#/definitions/sonde_query_results_format" $ref: "#/definitions/sonde_query_results_format"
/sonde/{serial}: /sonde/{serial}:
get: get:
summary: Gets telemetry data from sondes summary: Request telemetry data for an individual radiosonde
description: > description: >
Gets telemetry data for a sonde Use this to request all available telemetry data for an individual radiosonde, specified by serial number.
produces: produces:
- "application/json" - "application/json"
parameters: parameters:
- in: path - in: path
name: serial name: serial
description: Serial number of the radio sonde to receive description: Serial number of the radiosonde to request data for. e.g. S1130567
required: true required: true
type: string type: string
responses: responses:
200: 200:
description: Returns a dictionary keyed by serial number of a dictionary of times with SondeHub Telemetry values description: Returns a time-sorted array of SondeHub Telemetry objects. If no data for the requested serial number is available, the array will be empty.
schema: schema:
type: array type: array
items: items:
@ -125,7 +127,7 @@ paths:
/listeners: /listeners:
get: get:
deprecated: true deprecated: true
summary: Gets a list of stations that have reported a radiosonde in the last 3 days. Used as a legacy endpoint for sondehub.org summary: Requests a list of stations that have reported to Sondehub in the last 3 days. Used as a legacy endpoint for tracker.sondehub.org
produces: produces:
- "application/json" - "application/json"
responses: responses:
@ -139,10 +141,10 @@ paths:
properties: properties:
name: name:
type: string type: string
description: Callsign of the station listening description: Callsign of the station.
tdiff_hours: tdiff_hours:
type: number type: number
description: Number of hours since the station was last heard from description: Number of hours since the station was last heard from.
lon: lon:
type: number type: number
format: double format: double
@ -153,9 +155,9 @@ paths:
description: Latitude of the station description: Latitude of the station
alt: alt:
type: number type: number
description: number of meters above sealevel description: Altitude of the station, in metres ASL.
description: description:
description: text description of the station description: Text Description of the station, with HTML formatting.
type: string type: string
put: put:
summary: 'Allows a station to upload their station information to the SondeHub database, for display on the SondeHub Tracker map. This endpoint can also be used to upload chase-car positions by setting the "mobile" setting to True' summary: 'Allows a station to upload their station information to the SondeHub database, for display on the SondeHub Tracker map. This endpoint can also be used to upload chase-car positions by setting the "mobile" setting to True'
@ -171,25 +173,26 @@ paths:
$ref: "#/definitions/listener" $ref: "#/definitions/listener"
responses: responses:
200: 200:
description: Telemetry logged description: Station Position successfully uploaded.
/sondes/websocket: /sondes/websocket:
get: get:
description: Gets a presigned URL for using to connect to the MQTT websocket endpoint description: Gets a presigned URL for use in connecting to the MQTT websocket endpoint.
produces: produces:
- "text/plain" - "text/plain"
responses: responses:
200: 200:
description: A presigned URL for connecting to a websocket MQTT feed. description: A presigned URL for connecting to the websocket MQTT feed.
/predictions: /predictions:
get: get:
deprecated: true deprecated: true
description: radiosonde landing predictions description: Radiosonde landing predictions
produces: produces:
- "application/json" - "application/json"
parameters: parameters:
- in: query - in: query
name: vehicles name: vehicles
type: string type: string
description: If provided, filters predictions to a single provided serial number. Should be provided, but left blank if no filtering is required.
responses: responses:
200: 200:
description: Prediction results description: Prediction results
@ -198,7 +201,7 @@ paths:
/datanew: /datanew:
get: get:
deprecated: true deprecated: true
description: Legacy endpoint that is utilized to make sondehub ui work description: "Legacy endpoint required by the sondehub tracker."
parameters: parameters:
- in: query - in: query
name: type name: type
@ -212,7 +215,7 @@ paths:
- in: query - in: query
name: mode name: mode
type: string type: string
description: duration to query description: Duration to query
enum: enum:
- "3days" - "3days"
- "1day" - "1day"
@ -223,14 +226,14 @@ paths:
- in: query - in: query
name: vehicles name: vehicles
type: string type: string
description: "only supports either none, or a single serial number" description: "Filter by serial. Currently only supports either none, or a single serial number"
- in: query - in: query
name: position_id name: position_id
type: string type: string
format: date-time format: date-time
responses: responses:
200: 200:
description: Results compatiable with sondehub ui description: Results compatible with sondehub mobile-tracker.
schema: schema:
type: object type: object
properties: properties:
@ -249,7 +252,7 @@ parameters:
required: true required: true
name: body name: body
schema: schema:
description: Open telementry format description: SondeHub telemetry format
items: items:
$ref: "#/definitions/telemetry_format" $ref: "#/definitions/telemetry_format"
definitions: definitions:
@ -262,7 +265,7 @@ definitions:
datetime: datetime:
$ref: "#/definitions/telemetry_format" $ref: "#/definitions/telemetry_format"
telemetry_format: telemetry_format:
description: Open telementry format description: SondeHub telemetry format
type: "object" type: "object"
required: required:
- software_name - software_name
@ -282,7 +285,7 @@ definitions:
description: > description: >
Name of the decoding software Name of the decoding software
e.g. 'radiosonde_auto_rx', 'dxlAPRS', 'RS41Tracker' e.g. 'radiosonde_auto_rx', 'dxlAPRS', 'RS41Tracker', 'mySondy'
type: "string" type: "string"
software_version: software_version:
description: > description: >
@ -303,6 +306,7 @@ definitions:
format: "date-time" format: "date-time"
manufacturer: manufacturer:
type: "string" type: "string"
description: "Radiosonde Manufacturer, as determined from the transmit modulation and high-level packet format."
enum: enum:
- Vaisala - Vaisala
- Graw - Graw
@ -312,6 +316,7 @@ definitions:
- Meteo-Radiy - Meteo-Radiy
type: type:
type: "string" type: "string"
description: "The high-level radiosonde model, as can be determined just from the transmit modulation and high-level packet format."
enum: enum:
- RS41 - RS41
- DFM - DFM
@ -333,7 +338,7 @@ definitions:
type: "number" type: "number"
format: "integer" format: "integer"
description: > description: >
Frame Number, ideally unique over the entire flight. Frame Number, ideally unique over the entire flight. Should be taken from the telemetry. For some radiosondes (DFM, M10, M20), the datetime (converted to a unix time) is used instead of the provided frame number.
datetime: datetime:
type: "string" type: "string"
@ -357,7 +362,7 @@ definitions:
format: "double" format: "double"
subtype: subtype:
description: Detailed Radiosonde Model Type description: Detailed Radiosonde Model Type, as determined through analysis of the telemetry.
type: "string" type: "string"
enum: enum:
- 'RS41-SG' - 'RS41-SG'
@ -371,8 +376,6 @@ definitions:
- 'M20' - 'M20'
- 'MRZ-H1' - 'MRZ-H1'
frequency: frequency:
type: "number" type: "number"
format: "float" format: "float"
@ -431,9 +434,10 @@ definitions:
format: double format: double
minItems: 3 minItems: 3
maxItems: 3 maxItems: 3
description: Station position, as a list [lat, lon, alt] description: Station position, as a list [lat, lon, alt].
uploader_antenna: uploader_antenna:
type: string type: string
description: Station antenna/receiver information, free-text string.
listener: listener:
type: object type: object
properties: properties:
@ -444,7 +448,7 @@ definitions:
description: "Software version number, e.g. 1.5.1" description: "Software version number, e.g. 1.5.1"
type: "string" type: "string"
uploader_callsign: uploader_callsign:
description: "Uploader's callsign, # e.g. CHANGEME_AUTO_RX" description: "Station callsign, # e.g. CHANGEME_AUTO_RX"
type: "string" type: "string"
uploader_position: uploader_position:
description: "Station position, as a list [lat, lon, alt] Note: This may be set to null, which will result in the station position not appearing on the map." description: "Station position, as a list [lat, lon, alt] Note: This may be set to null, which will result in the station position not appearing on the map."
@ -458,11 +462,11 @@ definitions:
description: Uploader's antenna description description: Uploader's antenna description
type: "string" type: "string"
uploader_contact_email: uploader_contact_email:
description: "user_contact_email@host.com, # Optional contact e-mail, to assist SondeHub admins in resolving faults." description: "Optional contact e-mail, to assist SondeHub admins in resolving faults. e.g. user_contact_email@host.com"
type: "string" type: "string"
mobile: mobile:
type: boolean type: boolean
description: "Set to true to appear as a chase-car on the tracker map." description: "Indicates that the station is mobile, and should appear as a chase car on the tracker map. Set to false if this is a fixed station."
predictions: predictions:
type: array type: array
items: items: