### Activate Virtual Environment and Start Development Server Source: https://context7.com/librespacefoundation/satnogs/llms.txt Activate the virtual environment and start the development server. ```bash workon satnogs-db ``` ```bash ./bin/djangoctl.sh develop . ``` -------------------------------- ### Install and Bundle Frontend Assets Source: https://context7.com/librespacefoundation/satnogs/llms.txt Install Node.js dependencies and bundle frontend assets using Gulp. ```bash npm install ``` ```bash ./node_modules/.bin/gulp ``` -------------------------------- ### Install Frontend Dependencies Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/installation-virtualenv.md Install frontend dependencies using npm and then run the gulp build process to copy static assets. ```bash $ npm install $ ./node_modules/.bin/gulp ``` -------------------------------- ### Install Frontend Dependencies Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/developer-guide.md Use npm to install third-party static assets required for frontend development. ```bash $ npm install ``` -------------------------------- ### Initialize Database with Demo Data (VirtualEnv) Source: https://context7.com/librespacefoundation/satnogs/llms.txt Initialize the database with demo data when using a virtual environment setup. ```bash ./bin/djangoctl.sh initialize ``` -------------------------------- ### Run Development Server Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/installation-virtualenv.md Start the satnogs-db development server using the provided script. ```bash (satnogs-db)$ ./bin/djangoctl.sh develop . ``` -------------------------------- ### Install New Frontend Dependency Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/developer-guide.md Add a new package to manage frontend dependencies using npm. ```bash $ npm install ``` -------------------------------- ### Run satnogs-db with Docker Compose Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/installation-docker.md Start the satnogs-db services in detached mode with build. ```bash docker compose up -d --build ``` -------------------------------- ### Submit an Optical Observation Source: https://context7.com/librespacefoundation/satnogs/llms.txt Upload an optical observation, including a JSON data file and a diagnostic plot image. Requires authentication with an API token. Ensure the JSON data includes 'start', 'site_id', and 'satellites'. ```bash cat > observation_data.json << 'EOF' { "start": "2024-03-15T02:30:00.000000", "site_id": 7, "satellites": [ {"satno": 25544}, {"satno": 43017} ] } EOF ``` ```bash curl -X POST "https://db.satnogs.org/api/optical-observations/" \ -H "Authorization: Token YOUR_API_TOKEN" \ -F "data=@observation_data.json;type=application/json" \ -F "diagnostic_plot=@/path/to/plot.png" ``` -------------------------------- ### GET /api/artifacts/ — List and retrieve observation artifacts Source: https://context7.com/librespacefoundation/satnogs/llms.txt Returns HDF5-formatted artifact files collected during satellite observations. Filterable by SatNOGS Network observation ID. Supports comma-separated lists of observation IDs. ```APIDOC ## GET /api/artifacts/ ### Description Returns HDF5-formatted artifact files collected during satellite observations. Filterable by SatNOGS Network observation ID. Supports comma-separated lists of observation IDs. ### Method GET ### Endpoint /api/artifacts/ ### Parameters #### Path Parameters None #### Query Parameters - **network_obs_id** (integer) - Optional - Filter artifacts by SatNOGS Network observation ID. - **observation_ids** (string) - Optional - Filter artifacts by a comma-separated list of observation IDs. ### Request Example ```bash # List artifacts for a specific network observation curl "https://db.satnogs.org/api/artifacts/?network_obs_id=3376466" # Filter by multiple observation IDs curl "https://db.satnogs.org/api/artifacts/?observation_ids=3376466,3376467,3376468" # Retrieve a single artifact by ID curl "https://db.satnogs.org/api/artifacts/1337/" ``` ### Response #### Success Response (200 OK) Returns a JSON object containing artifact information. - **id** (integer) - The unique identifier for the artifact. - **network_obs_id** (integer) - The SatNOGS Network observation ID associated with the artifact. - **artifact_file** (string) - The URL to the artifact file. #### Response Example ```json { "id": 1337, "network_obs_id": 3376466, "artifact_file": "http://db.satnogs.org/media/artifacts/bba35b2d-76cc-4a8f-9b8a-4a2ecb09c6df.h5" } ``` ``` -------------------------------- ### GET /api/modes/ — List RF modes Source: https://context7.com/librespacefoundation/satnogs/llms.txt Returns all RF modulation modes tracked in SatNOGS DB. Cached endpoint; supports JSON and JSON-LD responses. ```APIDOC ## GET /api/modes/ ### Description Returns all RF modulation modes tracked in SatNOGS DB. Cached endpoint; supports JSON and JSON-LD responses. ### Method GET ### Endpoint /api/modes/ ### Parameters #### Path Parameters None #### Query Parameters None ### Request Example ```bash # List all RF modes curl "https://db.satnogs.org/api/modes/" # Retrieve a single mode by ID curl "https://db.satnogs.org/api/modes/49/" # JSON-LD format curl -H "Accept: application/ld+json" "https://db.satnogs.org/api/modes/" ``` ### Response #### Success Response (200 OK) Returns a JSON array of RF modes. - **id** (integer) - The unique identifier for the mode. - **name** (string) - The name of the RF mode. #### Response Example ```json [ {"id": 1, "name": "FM"}, {"id": 2, "name": "AFSK"}, {"id": 49, "name": "AFSK"} ] ``` ``` -------------------------------- ### GET /api/optical-observations/ — List optical observations Source: https://context7.com/librespacefoundation/satnogs/llms.txt Returns optical satellite identification observations. Filterable by date range (`before`/`after`) and supports returning the last N observations. Each observation includes satellite identifications with NORAD IDs. ```APIDOC ## GET /api/optical-observations/ ### Description Returns optical satellite identification observations. Filterable by date range (`before`/`after`) and supports returning the last N observations. Each observation includes satellite identifications with NORAD IDs. ### Method GET ### Endpoint /api/optical-observations/ ### Parameters #### Path Parameters None #### Query Parameters - **last_n** (integer) - Optional - Returns the last N optical observations. - **before** (string) - Optional - Filters observations before a specific date (ISO 8601 format). - **after** (string) - Optional - Filters observations after a specific date (ISO 8601 format). ### Request Example ```bash # List the 10 most recent optical observations curl "https://db.satnogs.org/api/optical-observations/?last_n=10" ``` ### Response #### Success Response (200 OK) Returns a JSON array of optical observation objects. Each object contains details about the observation and identified satellites. #### Response Example (Example response structure not provided in source) ``` -------------------------------- ### GET /api/tle/ — List latest TLE sets Source: https://context7.com/librespacefoundation/satnogs/llms.txt Returns the most recent two-line element sets for all satellites with distributable TLEs. Filterable by NORAD ID, sat_id list, and TLE source. Supports plain-text TLE format via `Accept` header. ```APIDOC ## GET /api/tle/ ### Description Returns the most recent two-line element sets for all satellites with distributable TLEs. Filterable by NORAD ID, sat_id list, and TLE source. Supports plain-text TLE format via `Accept` header. ### Method GET ### Endpoint /api/tle/ ### Parameters #### Path Parameters None #### Query Parameters - **norad_cat_id** (integer) - Optional - Filter TLEs by NORAD catalog ID. - **sat_id** (string) - Optional - Filter TLEs by a comma-separated list of sat_ids. ### Request Example ```bash # Get all latest TLEs as JSON curl "https://db.satnogs.org/api/tle/" # Filter by NORAD catalog ID curl "https://db.satnogs.org/api/tle/?norad_cat_id=25544" # Filter by multiple sat_ids (comma-separated) curl "https://db.satnogs.org/api/tle/?sat_id=S25544,S43017" # Get TLEs in plain-text format curl -H "Accept: text/plain" "https://db.satnogs.org/api/tle/?norad_cat_id=25544" ``` ### Response #### Success Response (200 OK) Returns a JSON object containing TLE data for the requested satellites. - **tle0** (string) - The first line of the TLE. - **tle1** (string) - The second line of the TLE. - **tle2** (string) - The third line of the TLE. - **tle_source** (string) - The source of the TLE data. - **norad_cat_id** (integer) - The NORAD catalog ID. - **updated** (string) - The timestamp when the TLE was last updated. #### Response Example ```json { "tle0": "0 ISS (ZARYA)", "tle1": "1 25544U 98067A 21009.90234038 .00001675 00000-0 38183-4 0 9997", "tle2": "2 25544 51.6464 45.6388 0000512 205.3232 213.2158 15.49275327264062", "tle_source": "undisclosed", "norad_cat_id": 25544, "updated": "2021-01-09T22:46:37.781923Z" } ``` ``` -------------------------------- ### Initialize Database Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/installation-virtualenv.md Create, set up, and populate the database with demo data for the satnogs-db instance. ```bash (satnogs-db)$ ./bin/djangoctl.sh initialize ``` -------------------------------- ### Initialize Database with Demo Data Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/installation-docker.md Create, set up, and populate the database with demo data using Django's management commands within the Docker container. ```bash docker compose exec web djangoctl.sh initialize ``` -------------------------------- ### Generate Documentation Locally Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/developer-guide.md Set up a Python virtual environment and use Sphinx to build HTML documentation. ```bash cd docs virtualenv -p python3 env source env/bin/activate pip install sphinx_rtd_theme make html SPHINXOPTS="-W" ``` -------------------------------- ### Create and Link Virtual Environment Source: https://context7.com/librespacefoundation/satnogs/llms.txt Create a Python virtual environment named 'satnogs-db' and link it to the current directory. ```bash mkvirtualenv satnogs-db -a . ``` -------------------------------- ### Configure Environment Variables Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/installation-docker.md Copy the distribution environment file to create your local configuration. ```bash cp env-dist .env ``` -------------------------------- ### Build Frontend Assets Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/installation-docker.md Test and copy the newly downloaded static assets using Gulp. ```bash ./node_modules/.bin/gulp ``` -------------------------------- ### Configure Environment Variables Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/installation-virtualenv.md Copy the distribution environment file to create a local configuration file for your settings. ```bash $ cp env-dist .env ``` -------------------------------- ### Create Virtual Environment Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/installation-virtualenv.md Create a new virtual environment named 'satnogs-db' and associate it with the current project directory using virtualenvwrapper. ```bash $ mkvirtualenv satnogs-db -a . ``` -------------------------------- ### Activate Virtual Environment Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/installation-virtualenv.md Activate the 'satnogs-db' Python virtual environment to begin development. ```bash $ workon satnogs-db ``` -------------------------------- ### Regenerate Requirement Files Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/developer-guide.md Update requirement files (requirements.txt, requirements-dev.txt, constraints.txt) after changes in setup.cfg. ```bash $ ./contrib/refresh-requirements-docker.sh ``` -------------------------------- ### Run Frontend Development Tasks Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/developer-guide.md Execute gulp tasks for copying assets, linting, and testing frontend code. ```bash $ ./node_modules/.bin/gulp ``` -------------------------------- ### Copy Frontend Assets Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/developer-guide.md Manually copy newly downloaded static assets after adding or removing dependencies. ```bash $ ./node_modules/.bin/gulp assets ``` -------------------------------- ### Filter Optical Observations by Date Range Source: https://context7.com/librespacefoundation/satnogs/llms.txt Use the 'after' and 'before' parameters to retrieve optical observations within a specific date range. ```bash curl "https://db.satnogs.org/api/optical-observations/?after=2024-01-01T00:00:00Z&before=2024-06-01T00:00:00Z" ``` -------------------------------- ### Create Annotated Tag for Release Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/releasing.md Use this command to create an annotated tag from the master branch for a new release. Ensure the commit message follows the specified format. ```bash git tag -a X.Y -m "Tag version 'X.Y'" ``` -------------------------------- ### Clone satnogs-db Repository Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/installation-docker.md Clone the source code from the GitLab repository and navigate into the project directory. ```bash git clone https://gitlab.com/librespacefoundation/satnogs/satnogs-db.git cd satnogs-db ``` -------------------------------- ### Clone satnogs-db Repository Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/installation-virtualenv.md Clone the source code from the official GitLab repository and navigate into the project directory. ```bash $ git clone https://gitlab.com/librespacefoundation/satnogs/satnogs-db.git $ cd satnogs-db ``` -------------------------------- ### Sign Commits with Developer's Certificate of Origin Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/CONTRIBUTING.md Append this line to your commit message to certify that you have the right to submit the contribution under the project's open source license. Use your real name. ```git Signed-off-by: Random J Developer ``` -------------------------------- ### List and Retrieve Observation Artifacts Source: https://context7.com/librespacefoundation/satnogs/llms.txt Returns HDF5-formatted artifact files collected during satellite observations. This endpoint is filterable by SatNOGS Network observation ID and supports comma-separated lists of observation IDs. ```bash # List artifacts for a specific network observation curl "https://db.satnogs.org/api/artifacts/?network_obs_id=3376466" ``` ```bash # Filter by multiple observation IDs curl "https://db.satnogs.org/api/artifacts/?observation_ids=3376466,3376467,3376468" ``` ```bash # Retrieve a single artifact by ID curl "https://db.satnogs.org/api/artifacts/1337/" ``` -------------------------------- ### List Transmitter Parameter Schemas Source: https://context7.com/librespacefoundation/satnogs/llms.txt Retrieve versioned JSON schemas for transmitter parameters. Supports filtering by date and accessing the latest schema. ```bash curl "https://db.satnogs.org/api/transmitter-params-schemas/" ``` ```bash curl "https://db.satnogs.org/api/transmitter-params-schemas/?date=2023-06-01T00:00:00Z" ``` ```bash curl "https://db.satnogs.org/api/transmitter-params-schemas/latest/" ``` ```bash curl "https://db.satnogs.org/api/transmitter-params-schemas/3/" ``` -------------------------------- ### Submit Telemetry Frame (SiDS) Source: https://context7.com/librespacefoundation/satnogs/llms.txt Use this endpoint to submit a raw satellite telemetry frame. It auto-creates a satellite entry if the NORAD ID is new and triggers asynchronous decoding. Requires authentication. ```bash # Submit a telemetry frame (requires authentication) curl -X POST "https://db.satnogs.org/api/telemetry/" \ -H "Authorization: Token YOUR_API_TOKEN" \ -F "noradID=25544" \ -F "source=MyStation" \ -F "timestamp=2021-01-10T12:00:00Z" \ -F "latitude=48.8566" \ -F "longitude=2.3522" \ -F "frame=A6A0A66086A240404040E1" \ -F "observation_id=3376466" \ -F "station_id=42" ``` -------------------------------- ### Retrieve a Single Optical Observation Source: https://context7.com/librespacefoundation/satnogs/llms.txt Fetch a specific optical observation by its unique ID. ```bash curl "https://db.satnogs.org/api/optical-observations/42/" ``` -------------------------------- ### Upload Observation Artifact Source: https://context7.com/librespacefoundation/satnogs/llms.txt Uploads an HDF5-formatted observation artifact file. The file must contain an `artifact_version` attribute. This operation requires authentication and returns the ID of the created artifact. ```bash # Upload an HDF5 artifact (requires authentication) curl -X POST "https://db.satnogs.org/api/artifacts/" \ -H "Authorization: Token YOUR_API_TOKEN" \ -F "artifact_file=@/path/to/observation.h5" ``` -------------------------------- ### Refresh Python Requirements Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/maintenance.md Run this script to refresh the Python requirements files. Stage and commit the updated files afterward. ```bash $ ./contrib/refresh-requirements.sh ``` -------------------------------- ### Update Frontend Dependencies Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/maintenance.md Use npm to update frontend dependencies while respecting semantic versioning. This command updates all packages listed in package.json. ```bash $ npm update ``` -------------------------------- ### List Transmitter Parameter Schemas Source: https://context7.com/librespacefoundation/satnogs/llms.txt Retrieve versioned JSON schemas that define valid parameter structures for transmitter entries. Supports querying by date and accessing the latest schema. ```APIDOC ## GET /api/transmitter-params-schemas/ ### Description Returns versioned JSON schemas defining valid parameter structures for transmitter entries. Supports querying for the schema valid at a specific date and a `/latest/` action endpoint. ### Method GET ### Endpoint https://db.satnogs.org/api/transmitter-params-schemas/ ### Query Parameters - **date** (string) - Optional - Filter schemas applicable at a specific date (ISO 8601 format). ### Endpoint Variations - **/latest/**: Retrieves the latest available schema. - **/{id}/**: Retrieves a specific schema by its ID. ``` -------------------------------- ### Submit an Optical Observation Source: https://context7.com/librespacefoundation/satnogs/llms.txt Submit a new optical observation, including a JSON data file and an optional diagnostic plot image. Requires authentication. ```APIDOC ## POST /api/optical-observations/ ### Description Submits a new optical observation. Accepts a multipart upload containing a JSON data file and a diagnostic plot image. Requires authentication. ### Method POST ### Endpoint https://db.satnogs.org/api/optical-observations/ ### Parameters #### Request Body - **data** (file) - Required - A JSON file containing observation data. Must include `start` (datetime), `site_id` (integer), and `satellites` (list of objects with `satno`). - **diagnostic_plot** (file) - Optional - An image file of the diagnostic plot. ### Request Example ```bash # Prepare JSON data file cat > observation_data.json << 'EOF' { "start": "2024-03-15T02:30:00.000000", "site_id": 7, "satellites": [ {"satno": 25544}, {"satno": 43017} ] } EOF # Upload observation curl -X POST "https://db.satnogs.org/api/optical-observations/" \ -H "Authorization: Token YOUR_API_TOKEN" \ -F "data=@observation_data.json;type=application/json" \ -F "diagnostic_plot=@/path/to/plot.png" ``` ### Response #### Success Response (201 Created) Returns the full observation object. #### Error Responses - **400 Bad Request**: If the JSON is malformed or missing required fields. - **403 Forbidden**: If an observation with the same start time and station_id already exists. ``` -------------------------------- ### POST /api/artifacts/ — Upload an observation artifact Source: https://context7.com/librespacefoundation/satnogs/llms.txt Uploads an HDF5-formatted observation artifact file. The file must contain an `artifact_version` attribute. Returns the ID of the created artifact. ```APIDOC ## POST /api/artifacts/ ### Description Uploads an HDF5-formatted observation artifact file. The file must contain an `artifact_version` attribute. Returns the ID of the created artifact. ### Method POST ### Endpoint /api/artifacts/ ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **artifact_file** (file) - Required - The HDF5 artifact file to upload. Must contain an `artifact_version` attribute. ### Request Example ```bash curl -X POST "https://db.satnogs.org/api/artifacts/" \ -H "Authorization: Token YOUR_API_TOKEN" \ -F "artifact_file=@/path/to/observation.h5" ``` ### Response #### Success Response (200 OK) Returns a JSON object with the ID of the created artifact. - **id** (integer) - The ID of the newly created artifact. #### Response Example ```json {"id": 1337} ``` #### Error Response - **400 Bad Request**: Returned if the file is not valid HDF5 or is missing the `artifact_version` attribute. ``` -------------------------------- ### Display ITU Notification Links (Django Template) Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/db/templates/base/transmitter-suggestion-detail.html Conditionally displays links from ITU notifications if they exist, otherwise shows a hyphen. This is used for both current and transmitter entries. ```html {% if current_entry.itu_notification.urls %} {% for itu_url in current_entry.itu_notification.urls %} [[Link {{ forloop.counter }}]({{ itu_url }})] {% endfor %} {% else %} - {% endif %} ``` ```html {% if transmitter_entry.itu_notification.urls %} {% for itu_url in transmitter_entry.itu_notification.urls %} [[Link {{ forloop.counter }}]({{ itu_url }})] {% endfor %} {% else %} - {% endif %} ``` -------------------------------- ### Filter Optical Observations by Date Range Source: https://context7.com/librespacefoundation/satnogs/llms.txt Retrieve optical observations within a specified date range using 'after' and 'before' query parameters. ```APIDOC ## GET /api/optical-observations/ ### Description Retrieves a list of optical observations, with options to filter by date range. ### Method GET ### Endpoint https://db.satnogs.org/api/optical-observations/ ### Query Parameters - **after** (string) - Optional - Filter observations that occurred after this timestamp (ISO 8601 format). - **before** (string) - Optional - Filter observations that occurred before this timestamp (ISO 8601 format). ``` -------------------------------- ### List Telemetry Frames Source: https://context7.com/librespacefoundation/satnogs/llms.txt Use the /api/telemetry/ endpoint to retrieve demodulated data frames. This endpoint requires either a `satellite` (NORAD ID) or `sat_id` filter. Additional filters include app source, observer, and date range. Anonymous users are rate-limited. ```bash # Get telemetry for a satellite by NORAD ID (required filter) curl "https://db.satnogs.org/api/telemetry/?satellite=40379" ``` ```bash # Filter by sat_id curl "https://db.satnogs.org/api/telemetry/?sat_id=S40379" ``` ```bash # Filter by date range (ISO 8601) curl "https://db.satnogs.org/api/telemetry/?satellite=40379&start=2021-01-01T00:00:00Z&end=2021-01-31T23:59:59Z" ``` ```bash # Filter by submission source: network, manual, sids curl "https://db.satnogs.org/api/telemetry/?satellite=40379&app_source=network" ``` -------------------------------- ### Uninstall Frontend Dependency Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/docs/developer-guide.md Remove an existing package from frontend dependencies using npm. ```bash $ npm uninstall ``` -------------------------------- ### Display Unconfirmed Status (Django Template) Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/db/templates/base/transmitter-suggestion-detail.html Shows the unconfirmed status for current and transmitter entries, rendering 'Yes' or 'No' based on the boolean value, defaulting to a hyphen if not set. ```html {{ current_entry.unconfirmed|yesno:"Yes,No"|default:'-' }} ``` ```html {{ transmitter_entry.unconfirmed|yesno:"Yes,No"|default:'-' }} ``` -------------------------------- ### List Optical Observations Source: https://context7.com/librespacefoundation/satnogs/llms.txt Returns optical satellite identification observations. This endpoint is filterable by date range (`before`/`after`) and supports returning the last N observations. Each observation includes satellite identifications with NORAD IDs. ```bash # List the 10 most recent optical observations curl "https://db.satnogs.org/api/optical-observations/?last_n=10" ``` -------------------------------- ### List and Filter Satellites Source: https://context7.com/librespacefoundation/satnogs/llms.txt Use the /api/satellites/ endpoint to retrieve a list of approved satellites. You can filter by NORAD catalog ID, orbital status, and satellite status string. Satellites can also be looked up by their SatNOGS Satellite Identifier (sat_id) or NORAD ID. ```bash # List all satellites currently in orbit curl "https://db.satnogs.org/api/satellites/?in_orbit=true" ``` ```bash # Retrieve a single satellite by sat_id curl "https://db.satnogs.org/api/satellites/S43017/" ``` ```bash # Retrieve ISS by NORAD ID (compatibility route) curl "https://db.satnogs.org/api/satellites/25544/" ``` ```bash # Filter by status curl "https://db.satnogs.org/api/satellites/?status=alive" ``` -------------------------------- ### List RF Modes Source: https://context7.com/librespacefoundation/satnogs/llms.txt Returns all RF modulation modes tracked in SatNOGS DB. This is a cached endpoint and supports both JSON and JSON-LD responses. ```bash # List all RF modes curl "https://db.satnogs.org/api/modes/" ``` ```bash # Retrieve a single mode by ID curl "https://db.satnogs.org/api/modes/49/" ``` ```bash # JSON-LD format curl -H "Accept: application/ld+json" "https://db.satnogs.org/api/modes/" ``` -------------------------------- ### Display Transmitter Parameter Changes (Django Template) Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/db/templates/base/transmitter-suggestion-detail.html Outputs transmitter parameters as a JSON script tag if they exist, indicating changes. This is typically used for client-side JavaScript to process parameter data. ```html {% if current_entry.params %} {{ current_entry.params|json_script:"params-current" }} Changes in transmitter parameters: ---------------------------------- {% endif %} ``` -------------------------------- ### Retrieve a Single Optical Observation Source: https://context7.com/librespacefoundation/satnogs/llms.txt Fetch details of a specific optical observation by its ID. ```APIDOC ## GET /api/optical-observations/{id}/ ### Description Retrieves a single optical observation by its unique identifier. ### Method GET ### Endpoint https://db.satnogs.org/api/optical-observations/{id}/ ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the optical observation. ``` -------------------------------- ### POST /api/telemetry/ — Submit a telemetry frame (SiDS) Source: https://context7.com/librespacefoundation/satnogs/llms.txt Submits a raw satellite telemetry frame. Used by SatNOGS Network and third-party observers. Auto-creates a satellite entry if the NORAD ID is not yet in the database and triggers async decoding. ```APIDOC ## POST /api/telemetry/ ### Description Submits a raw satellite telemetry frame. Used by SatNOGS Network and third-party observers. Auto-creates a satellite entry if the NORAD ID is not yet in the database and triggers async decoding. ### Method POST ### Endpoint /api/telemetry/ ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **noradID** (integer) - Required - The NORAD catalog ID of the satellite. - **source** (string) - Required - The source of the telemetry data (e.g., station callsign). - **timestamp** (string) - Required - The timestamp of the telemetry frame in ISO 8601 format. - **latitude** (number) - Required - The latitude of the observer. - **longitude** (number) - Required - The longitude of the observer. - **frame** (string) - Required - The raw telemetry frame data. - **observation_id** (integer) - Optional - The ID of the SatNOGS Network observation. - **station_id** (integer) - Optional - The ID of the station that collected the data. ### Request Example ```bash curl -X POST "https://db.satnogs.org/api/telemetry/" \ -H "Authorization: Token YOUR_API_TOKEN" \ -F "noradID=25544" \ -F "source=MyStation" \ -F "timestamp=2021-01-10T12:00:00Z" \ -F "latitude=48.8566" \ -F "longitude=2.3522" \ -F "frame=A6A0A66086A240404040E1" \ -F "observation_id=3376466" \ -F "station_id=42" ``` ### Response #### Success Response (201 Created) Indicates successful submission of the telemetry frame. #### Error Response - **400 Bad Request**: Returned if the NORAD ID is invalid or coordinates are missing. ``` -------------------------------- ### List telemetry frames Source: https://context7.com/librespacefoundation/satnogs/llms.txt Retrieves demodulated data frames from satellite observations. Requires filtering by either NORAD ID or sat_id. Supports filtering by application source and date range. Rate-limited for anonymous users. ```APIDOC ## GET /api/telemetry/ — List telemetry frames ### Description Returns demodulated data frames from satellite observations. **Requires either `satellite` (NORAD ID) or `sat_id` filter.** Filterable by app source, observer, and date range. Rate-limited for anonymous users. ### Method GET ### Endpoint /api/telemetry/ #### Query Parameters - **satellite** (integer) - Required - NORAD ID of the satellite. - **sat_id** (string) - Required - SatNOGS Satellite Identifier. - **start** (string) - Optional - Start date and time in ISO 8601 format. - **end** (string) - Optional - End date and time in ISO 8601 format. - **app_source** (string) - Optional - Filter by submission source (e.g., 'network', 'manual', 'sids'). ### Request Example ```bash # Get telemetry for a satellite by NORAD ID (required filter) curl "https://db.satnogs.org/api/telemetry/?satellite=40379" # Filter by sat_id curl "https://db.satnogs.org/api/telemetry/?sat_id=S40379" # Filter by date range (ISO 8601) curl "https://db.satnogs.org/api/telemetry/?satellite=40379&start=2021-01-01T00:00:00Z&end=2021-01-31T23:59:59Z" # Filter by submission source: network, manual, sids curl "https://db.satnogs.org/api/telemetry/?satellite=40379&app_source=network" ``` ### Response #### Success Response (200) - **norad_cat_id** (integer) - NORAD catalog ID of the satellite. - **transmitter** (string or null) - Identifier for the transmitter. - **app_source** (string) - Source of the telemetry data submission. #### Response Example ```json { "norad_cat_id": 40379, "transmitter": null, "app_source": "network" } ``` ``` -------------------------------- ### List Latest TLE Sets Source: https://context7.com/librespacefoundation/satnogs/llms.txt Retrieves the most recent two-line element sets for all satellites with distributable TLEs. This endpoint is filterable by NORAD ID, sat_id list, and TLE source. Plain-text TLE format is supported via the `Accept` header. ```bash # Get all latest TLEs as JSON curl "https://db.satnogs.org/api/tle/" ``` ```bash # Filter by NORAD catalog ID curl "https://db.satnogs.org/api/tle/?norad_cat_id=25544" ``` ```bash # Filter by multiple sat_ids (comma-separated) curl "https://db.satnogs.org/api/tle/?sat_id=S25544,S43017" ``` ```bash # Get TLEs in plain-text format curl -H "Accept: text/plain" "https://db.satnogs.org/api/tle/?norad_cat_id=25544" ``` -------------------------------- ### List and filter satellites Source: https://context7.com/librespacefoundation/satnogs/llms.txt Retrieves a list of all approved satellites. Supports filtering by NORAD catalog ID, orbital status, and satellite status. You can also retrieve a single satellite by its SatNOGS Satellite Identifier (sat_id) or NORAD ID. ```APIDOC ## GET /api/satellites/ — List and filter satellites ### Description Returns all approved satellites in the database. Filterable by NORAD catalog ID, orbital status, and satellite status string. Satellites are looked up by their SatNOGS Satellite Identifier (`sat_id`) or by NORAD ID via a compatibility route. ### Method GET ### Endpoint /api/satellites/ #### Query Parameters - **in_orbit** (boolean) - Optional - Filter by orbital status. - **status** (string) - Optional - Filter by satellite status string. ### Request Example ```bash # List all satellites currently in orbit curl "https://db.satnogs.org/api/satellites/?in_orbit=true" # Retrieve a single satellite by sat_id curl "https://db.satnogs.org/api/satellites/S43017/" # Retrieve ISS by NORAD ID (compatibility route) curl "https://db.satnogs.org/api/satellites/25544/" # Filter by status curl "https://db.satnogs.org/api/satellites/?status=alive" ``` ### Response #### Success Response (200) - **sat_id** (string) - SatNOGS Satellite Identifier. - **norad_cat_id** (integer) - NORAD catalog ID. - **name** (string) - Satellite name. - **status** (string) - Current status of the satellite. - **launched** (string) - Launch date and time. #### Response Example ```json { "sat_id": "S25544", "norad_cat_id": 25544, "name": "ISS", "status": "in orbit", "launched": "1998-11-20T00:00:00Z" } ``` ``` -------------------------------- ### Submit Externally Decoded Frame Source: https://context7.com/librespacefoundation/satnogs/llms.txt Accepts decoded telemetry data for a specific frame ID already in the database. This marks the frame as decoded and can optionally write to InfluxDB. Requires authentication. ```bash # Submit decoded frame data (requires authentication) curl -X POST "https://db.satnogs.org/api/decoded_frame/" \ -H "Authorization: Token YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "frame_id": 98765, "decoded_data": { "battery_voltage": 3.7, "temperature": 22.5, "uptime_seconds": 86400 } }' ``` -------------------------------- ### Display Satellite and Observer Data Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/db/templates/base/stats.html This Django template code iterates through satellite and observer data to display NORAD ID, satellite name, data counts, decoded counts, and the latest payload timestamp. It includes conditional logic for rendering satellite names and links. ```html {% if satellites and observers %} {% for sat in satellites %} {% if sat.count != 0 %} {% if sat.satellite_identifier__sat_id %} {% else %} {% endif %} {% endif %} {% endfor %} Norad ID Name Data Decoded Latest {{sat.satellite_entry__norad_cat_id}} [{{sat.satellite_entry__name}}]({% url 'satellite' sat_id=sat.satellite_identifier__sat_id %}) {{sat.satellite_entry__name}} {{sat.count}} {{sat.decoded}} {{sat.latest_payload|date:"Y-m-d H:i:s"}} {% for obs in observers %} {% endfor %} Name Data Latest {{obs.observer}} {{obs.count}} {{obs.latest_payload|date:"Y-m-d H:i:s"}} {% endif %} ``` -------------------------------- ### JavaScript Confirmation for Email Removal Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/db/templates/account/email.html Adds an event listener to the 'remove' action to prompt the user for confirmation before proceeding. This prevents accidental removal of email addresses. ```javascript (function() { var message = "Do you really want to remove the selected e-mail address?"; var actions = document.getElementsByName('action_remove'); if (actions.length) { actions[0].addEventListener("click", function(e) { if (! confirm(message)) { e.preventDefault(); } }); } })(); ``` -------------------------------- ### List and Filter Transmitters Source: https://context7.com/librespacefoundation/satnogs/llms.txt The /api/transmitters/ endpoint returns approved transmitters. You can filter by NORAD ID, sat_id, status (alive/active), RF mode, service type, transmitter type, and frequency range. Individual transmitters can be retrieved by their UUID. ```bash # List all active transmitters for ISS curl "https://db.satnogs.org/api/transmitters/?satellite__norad_cat_id=25544&status=active" ``` ```bash # Filter by service type (Amateur, Commercial, etc.) curl "https://db.satnogs.org/api/transmitters/?service=Amateur" ``` ```bash # Filter by transmitter type curl "https://db.satnogs.org/api/transmitters/?type=Transmitter" ``` ```bash # Filter by frequency range (Hz) curl "https://db.satnogs.org/api/transmitters/?min_frequency=430000000&max_frequency=440000000" ``` ```bash # Retrieve a single transmitter by UUID curl "https://db.satnogs.org/api/transmitters/eozSf5mKyzNxoascs8V4bV/" ``` -------------------------------- ### List and filter transmitters Source: https://context7.com/librespacefoundation/satnogs/llms.txt Retrieves a list of approved transmitters, including transceivers and transponders. Supports filtering by NORAD ID, sat_id, status, RF mode, service type, transmitter type, and frequency range. ```APIDOC ## GET /api/transmitters/ — List and filter transmitters ### Description Returns approved transmitters (including transceivers and transponders) for satellites. Filterable by NORAD ID, sat_id, alive/status, RF mode, service type, transmitter type, and frequency range. ### Method GET ### Endpoint /api/transmitters/ #### Query Parameters - **satellite__norad_cat_id** (integer) - Optional - Filter by NORAD ID of the associated satellite. - **status** (string) - Optional - Filter by transmitter status (e.g., 'active'). - **service** (string) - Optional - Filter by service type (e.g., 'Amateur'). - **type** (string) - Optional - Filter by transmitter type (e.g., 'Transmitter'). - **min_frequency** (integer) - Optional - Filter by minimum frequency in Hz. - **max_frequency** (integer) - Optional - Filter by maximum frequency in Hz. ### Request Example ```bash # List all active transmitters for ISS curl "https://db.satnogs.org/api/transmitters/?satellite__norad_cat_id=25544&status=active" # Filter by service type (Amateur, Commercial, etc.) curl "https://db.satnogs.org/api/transmitters/?service=Amateur" # Filter by transmitter type curl "https://db.satnogs.org/api/transmitters/?type=Transmitter" # Filter by frequency range (Hz) curl "https://db.satnogs.org/api/transmitters/?min_frequency=430000000&max_frequency=440000000" # Retrieve a single transmitter by UUID curl "https://db.satnogs.org/api/transmitters/eozSf5mKyzNxoascs8V4bV/" ``` ### Response #### Success Response (200) - **uuid** (string) - Unique identifier for the transmitter. - **description** (string) - Description of the transmitter. - **alive** (boolean) - Indicates if the transmitter is currently active. - **type** (string) - Type of the transmitter (e.g., 'Transceiver'). - **downlink_low** (integer) - Lower bound of the downlink frequency in Hz. - **downlink_high** (integer) - Upper bound of the downlink frequency in Hz. - **status** (string) - Status of the transmitter. #### Response Example ```json { "uuid": "eozSf5mKyzNxoascs8V4bV", "description": "Mode V/U FM - Voice Repeater", "alive": true, "type": "Transceiver", "downlink_low": 437800000, "downlink_high": 437800000, "status": "active" } ``` ``` -------------------------------- ### CSRF Token for Form Submission (Django Template) Source: https://gitlab.com/librespacefoundation/satnogs/satnogs-db/-/blob/master/db/templates/base/transmitter-suggestion-detail.html Includes the CSRF token for secure form submissions. This is essential for any form that modifies data on the server in Django. ```html {% csrf_token %} ```