Last active
March 19, 2025 18:46
-
-
Save mmims/50c0a9f6d555033cdf123d4e81c9cc3b to your computer and use it in GitHub Desktop.
Collecter Service API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "openapi": "3.1.0", | |
| "info": { | |
| "title": "Sigman Collector Service", | |
| "description": "A service for collecting signals data.", | |
| "version": "0.1.0" | |
| }, | |
| "paths": { | |
| "/api/v1/ceoi": { | |
| "post": { | |
| "tags": [ | |
| "ceoi" | |
| ], | |
| "summary": "Create a new CEOI Signal.", | |
| "description": "Create a CEOI Signal record in the database.", | |
| "operationId": "create_ceoi_api_v1_ceoi_post", | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/CeoiSignal" | |
| } | |
| } | |
| }, | |
| "required": true | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Successful Response", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/QueueAddedResponse" | |
| } | |
| } | |
| } | |
| }, | |
| "422": { | |
| "description": "Validation Error", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/HTTPValidationError" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/api/v1/lob": { | |
| "post": { | |
| "tags": [ | |
| "lob" | |
| ], | |
| "summary": "Create a new Line of Bearing.", | |
| "description": "Create a Line of Bearing record in the database.", | |
| "operationId": "create_lob_api_v1_lob_post", | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Lob" | |
| } | |
| } | |
| }, | |
| "required": true | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Successful Response", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/QueueAddedResponse" | |
| } | |
| } | |
| } | |
| }, | |
| "422": { | |
| "description": "Validation Error", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/HTTPValidationError" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/api/v1/mission": { | |
| "post": { | |
| "tags": [ | |
| "mission" | |
| ], | |
| "summary": "Create a new mission.", | |
| "description": "Create a mission record in the database.\nMissions are used to group signals together over a long period of time.", | |
| "operationId": "create_mission_api_v1_mission_post", | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Mission" | |
| } | |
| } | |
| }, | |
| "required": true | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Successful Response", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/QueueAddedResponse" | |
| } | |
| } | |
| } | |
| }, | |
| "422": { | |
| "description": "Validation Error", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/HTTPValidationError" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/api/v1/signal": { | |
| "post": { | |
| "tags": [ | |
| "signal" | |
| ], | |
| "summary": "Create a new signal.", | |
| "description": "Create a signal record in the database.", | |
| "operationId": "create_signal_api_v1_signal_post", | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Signal" | |
| } | |
| } | |
| }, | |
| "required": true | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Successful Response", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/QueueAddedResponse" | |
| } | |
| } | |
| } | |
| }, | |
| "422": { | |
| "description": "Validation Error", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/HTTPValidationError" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/api/v1/spectral": { | |
| "post": { | |
| "tags": [ | |
| "spectral" | |
| ], | |
| "summary": "Create a new spectral.", | |
| "description": "Create a spectral record in the database.", | |
| "operationId": "create_spectral_api_v1_spectral_post", | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Spectral" | |
| } | |
| } | |
| }, | |
| "required": true | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Successful Response", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/QueueAddedResponse" | |
| } | |
| } | |
| } | |
| }, | |
| "422": { | |
| "description": "Validation Error", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/HTTPValidationError" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "components": { | |
| "schemas": { | |
| "CeoiSignal": { | |
| "properties": { | |
| "is_ooc": { | |
| "type": "boolean", | |
| "title": "Is Ooc", | |
| "description": "Indicates whether the signal is out of compliance." | |
| }, | |
| "uuid": { | |
| "type": "string", | |
| "maxLength": 36, | |
| "title": "Uuid", | |
| "description": "The UUID of the CEOI signal." | |
| }, | |
| "unit": { | |
| "type": "string", | |
| "maxLength": 500, | |
| "title": "Unit", | |
| "description": "The unit of the signal." | |
| }, | |
| "signal_condition": { | |
| "$ref": "#/components/schemas/ConditionLevel", | |
| "maxLength": 10, | |
| "description": "The signal condition." | |
| }, | |
| "mission_condition": { | |
| "$ref": "#/components/schemas/ConditionLevel", | |
| "maxLength": 10, | |
| "description": "The mission condition." | |
| }, | |
| "ceoi_band_center_frequency_in_hz": { | |
| "type": "integer", | |
| "title": "Ceoi Band Center Frequency In Hz", | |
| "description": "The center frequency in Hz of the CEOI band." | |
| }, | |
| "ceoi_bandwidth_in_hz": { | |
| "type": "integer", | |
| "title": "Ceoi Bandwidth In Hz", | |
| "description": "The bandwidth in Hz of the CEOI band." | |
| }, | |
| "signal_center_frequency_in_hz": { | |
| "type": "integer", | |
| "title": "Signal Center Frequency In Hz", | |
| "description": "The center frequency in Hz of the detected signal." | |
| }, | |
| "signal_id": { | |
| "type": "integer", | |
| "title": "Signal Id", | |
| "description": "The ID of the signal." | |
| }, | |
| "condition_start_time": { | |
| "type": "string", | |
| "format": "date-time", | |
| "title": "Condition Start Time", | |
| "description": "The start time of the signal condition." | |
| }, | |
| "condition_stop_time": { | |
| "type": "string", | |
| "format": "date-time", | |
| "title": "Condition Stop Time", | |
| "description": "The stop time of the signal condition." | |
| }, | |
| "duration": { | |
| "type": "number", | |
| "title": "Duration", | |
| "description": "The duration of the signal within the condition timeframe." | |
| }, | |
| "state": { | |
| "$ref": "#/components/schemas/SignalState", | |
| "description": "The state of the signal." | |
| }, | |
| "mission_start_time": { | |
| "type": "integer", | |
| "title": "Mission Start Time", | |
| "description": "The mission start time." | |
| } | |
| }, | |
| "type": "object", | |
| "required": [ | |
| "is_ooc", | |
| "uuid", | |
| "unit", | |
| "signal_condition", | |
| "mission_condition", | |
| "ceoi_band_center_frequency_in_hz", | |
| "ceoi_bandwidth_in_hz", | |
| "signal_center_frequency_in_hz", | |
| "signal_id", | |
| "condition_start_time", | |
| "condition_stop_time", | |
| "duration", | |
| "state", | |
| "mission_start_time" | |
| ], | |
| "title": "CeoiSignal", | |
| "description": "The CeoiSignal model represents a signal's compliance state based on conditions defined in a CEOI plan." | |
| }, | |
| "ConditionLevel": { | |
| "type": "string", | |
| "enum": [ | |
| "blue", | |
| "green", | |
| "yellow", | |
| "orange", | |
| "red", | |
| "black" | |
| ], | |
| "title": "ConditionLevel", | |
| "description": "The ConditionLevel enum represents the level of an EMCON condition." | |
| }, | |
| "HTTPValidationError": { | |
| "properties": { | |
| "detail": { | |
| "items": { | |
| "$ref": "#/components/schemas/ValidationError" | |
| }, | |
| "type": "array", | |
| "title": "Detail" | |
| } | |
| }, | |
| "type": "object", | |
| "title": "HTTPValidationError" | |
| }, | |
| "Lob": { | |
| "properties": { | |
| "gmt_lob_time": { | |
| "type": "string", | |
| "format": "date-time", | |
| "title": "Gmt Lob Time", | |
| "description": "When the lob was observed." | |
| }, | |
| "signal_id": { | |
| "type": "integer", | |
| "title": "Signal Id", | |
| "description": "The ID of the signal the lob is referencing." | |
| }, | |
| "frequency_in_hz": { | |
| "type": "integer", | |
| "title": "Frequency In Hz", | |
| "description": "The frequency of the signal in Hz." | |
| }, | |
| "lob_ao_a": { | |
| "type": "number", | |
| "title": "Lob Ao A", | |
| "description": "The angle of arrival of the lob." | |
| }, | |
| "heading": { | |
| "type": "number", | |
| "title": "Heading", | |
| "description": "The heading of the lob." | |
| }, | |
| "lob_angle_with_heading": { | |
| "type": "number", | |
| "title": "Lob Angle With Heading", | |
| "description": "The calculated angle of the lob with respect to the heading." | |
| }, | |
| "lob_error": { | |
| "type": "number", | |
| "title": "Lob Error", | |
| "description": "The error resolution of the lob." | |
| }, | |
| "confidence": { | |
| "type": "integer", | |
| "title": "Confidence", | |
| "description": "The confidence level of the lob." | |
| }, | |
| "uuid": { | |
| "type": "string", | |
| "maxLength": 36, | |
| "title": "Uuid", | |
| "description": "The UUID of the lob." | |
| }, | |
| "sensor_id": { | |
| "type": "string", | |
| "maxLength": 20, | |
| "title": "Sensor Id", | |
| "description": "The ID of the sensor that observed the lob." | |
| }, | |
| "htlx_location_lat": { | |
| "type": "number", | |
| "title": "Htlx Location Lat", | |
| "description": "The latitude of the sensor." | |
| }, | |
| "htlx_location_lon": { | |
| "type": "number", | |
| "title": "Htlx Location Lon", | |
| "description": "The longitude of the sensor." | |
| }, | |
| "mission_start_time": { | |
| "type": "integer", | |
| "title": "Mission Start Time", | |
| "description": "The mission start time." | |
| }, | |
| "gps_time": { | |
| "type": "integer", | |
| "title": "Gps Time", | |
| "description": "When the lob was observed in GPS time." | |
| } | |
| }, | |
| "type": "object", | |
| "required": [ | |
| "gmt_lob_time", | |
| "signal_id", | |
| "frequency_in_hz", | |
| "lob_ao_a", | |
| "heading", | |
| "lob_angle_with_heading", | |
| "lob_error", | |
| "confidence", | |
| "uuid", | |
| "sensor_id", | |
| "htlx_location_lat", | |
| "htlx_location_lon", | |
| "mission_start_time", | |
| "gps_time" | |
| ], | |
| "title": "Lob", | |
| "description": "The Lob model represents a line of bearing (LOB) observation." | |
| }, | |
| "Mission": { | |
| "properties": { | |
| "mission_start_time": { | |
| "type": "integer", | |
| "title": "Mission Start Time", | |
| "description": "The start time of the mission in Unix time." | |
| }, | |
| "mission_stop_time": { | |
| "type": "integer", | |
| "title": "Mission Stop Time", | |
| "description": "The stop time of the mission in Unix time." | |
| }, | |
| "duration": { | |
| "type": "number", | |
| "title": "Duration", | |
| "description": "The duration of the mission in seconds." | |
| } | |
| }, | |
| "type": "object", | |
| "required": [ | |
| "mission_start_time", | |
| "mission_stop_time", | |
| "duration" | |
| ], | |
| "title": "Mission", | |
| "description": "The Mission model represents a duration during which signals were observed and recorded." | |
| }, | |
| "QueueAddedResponse": { | |
| "properties": { | |
| "id": { | |
| "type": "string", | |
| "title": "Id", | |
| "description": "The ID of the message added to the queue." | |
| }, | |
| "type": { | |
| "type": "string", | |
| "title": "Type", | |
| "description": "The type of message added." | |
| } | |
| }, | |
| "type": "object", | |
| "required": [ | |
| "id", | |
| "type" | |
| ], | |
| "title": "QueueAddedResponse", | |
| "description": "The QueueAddedResponse model represents a message that was successfully added to a queue." | |
| }, | |
| "Signal": { | |
| "properties": { | |
| "is_target": { | |
| "type": "boolean", | |
| "title": "Is Target", | |
| "description": "Whether the signal is a target." | |
| }, | |
| "description": { | |
| "type": "string", | |
| "maxLength": 255, | |
| "title": "Description", | |
| "description": "The signal description." | |
| }, | |
| "frequency_in_hz": { | |
| "type": "integer", | |
| "title": "Frequency In Hz", | |
| "description": "The signal frequency in Hz." | |
| }, | |
| "bandwidth_in_hz": { | |
| "type": "integer", | |
| "title": "Bandwidth In Hz", | |
| "description": "The signal bandwidth in Hz." | |
| }, | |
| "rssi": { | |
| "type": "number", | |
| "title": "Rssi", | |
| "description": "The received signal strength indicator." | |
| }, | |
| "snr": { | |
| "type": "number", | |
| "title": "Snr", | |
| "description": "The signal-to-noise ratio." | |
| }, | |
| "signal_id": { | |
| "anyOf": [ | |
| { | |
| "type": "integer" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ], | |
| "title": "Signal Id" | |
| }, | |
| "detect_time": { | |
| "type": "string", | |
| "format": "date-time", | |
| "title": "Detect Time" | |
| }, | |
| "down_time": { | |
| "type": "string", | |
| "format": "date-time", | |
| "title": "Down Time" | |
| }, | |
| "duration": { | |
| "type": "number", | |
| "title": "Duration", | |
| "description": "The duration of the signal in seconds." | |
| }, | |
| "state": { | |
| "$ref": "#/components/schemas/SignalState", | |
| "description": "The state of the signal.", | |
| "default": "active" | |
| }, | |
| "priority": { | |
| "type": "integer", | |
| "title": "Priority", | |
| "description": "The signal priority." | |
| }, | |
| "uuid": { | |
| "type": "string", | |
| "maxLength": 36, | |
| "title": "Uuid", | |
| "description": "The signal UUID." | |
| }, | |
| "unique_id": { | |
| "type": "string", | |
| "maxLength": 36, | |
| "title": "Unique Id", | |
| "description": "The signal unique ID." | |
| }, | |
| "lastupdate": { | |
| "type": "string", | |
| "format": "date-time", | |
| "title": "Lastupdate", | |
| "description": "The last update time of the signal." | |
| }, | |
| "mission_start_time": { | |
| "type": "integer", | |
| "title": "Mission Start Time", | |
| "description": "The mission start time." | |
| }, | |
| "gps_time_up": { | |
| "type": "integer", | |
| "title": "Gps Time Up", | |
| "description": "When the signal came up in GPS time." | |
| }, | |
| "gps_time_down": { | |
| "type": "integer", | |
| "title": "Gps Time Down", | |
| "description": "When the signal went down in GPS time." | |
| } | |
| }, | |
| "type": "object", | |
| "required": [ | |
| "is_target", | |
| "description", | |
| "frequency_in_hz", | |
| "bandwidth_in_hz", | |
| "rssi", | |
| "snr", | |
| "signal_id", | |
| "detect_time", | |
| "down_time", | |
| "duration", | |
| "priority", | |
| "uuid", | |
| "unique_id", | |
| "lastupdate", | |
| "mission_start_time", | |
| "gps_time_up", | |
| "gps_time_down" | |
| ], | |
| "title": "Signal", | |
| "description": "The Signal model represents an observed signal and it's characteristics." | |
| }, | |
| "SignalState": { | |
| "type": "string", | |
| "enum": [ | |
| "active", | |
| "dwell", | |
| "down", | |
| "reset", | |
| "exit" | |
| ], | |
| "title": "SignalState" | |
| }, | |
| "Spectral": { | |
| "properties": { | |
| "time_received": { | |
| "type": "string", | |
| "format": "date-time", | |
| "title": "Time Received", | |
| "description": "The time the spectral data was received." | |
| }, | |
| "min_frequency_hz": { | |
| "type": "integer", | |
| "title": "Min Frequency Hz", | |
| "description": "The minimum frequency in Hz." | |
| }, | |
| "max_frequency_hz": { | |
| "type": "integer", | |
| "title": "Max Frequency Hz", | |
| "description": "The maximum frequency in Hz." | |
| }, | |
| "array_of_max_floats": { | |
| "type": "string", | |
| "format": "binary", | |
| "title": "Array Of Max Floats", | |
| "description": "A binary blob representing the spectral data. The data is a raw array of big-endian floats that has been compressed with gzip." | |
| }, | |
| "mission_start_time": { | |
| "type": "integer", | |
| "title": "Mission Start Time", | |
| "description": "The mission start time in unix time." | |
| }, | |
| "psd_id": { | |
| "type": "integer", | |
| "title": "Psd Id", | |
| "description": "The spectral identification number." | |
| } | |
| }, | |
| "type": "object", | |
| "required": [ | |
| "time_received", | |
| "min_frequency_hz", | |
| "max_frequency_hz", | |
| "array_of_max_floats", | |
| "mission_start_time", | |
| "psd_id" | |
| ], | |
| "title": "Spectral", | |
| "description": "The Spectral model represents a frequency spectrum observation at a specific point in time." | |
| }, | |
| "ValidationError": { | |
| "properties": { | |
| "loc": { | |
| "items": { | |
| "anyOf": [ | |
| { | |
| "type": "string" | |
| }, | |
| { | |
| "type": "integer" | |
| } | |
| ] | |
| }, | |
| "type": "array", | |
| "title": "Location" | |
| }, | |
| "msg": { | |
| "type": "string", | |
| "title": "Message" | |
| }, | |
| "type": { | |
| "type": "string", | |
| "title": "Error Type" | |
| } | |
| }, | |
| "type": "object", | |
| "required": [ | |
| "loc", | |
| "msg", | |
| "type" | |
| ], | |
| "title": "ValidationError" | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment