Frontend API Calls (from Signal-Classifier.html)
- Environment API
${baseUrl}/api/environment/rf-network?lat=${lat}&lon=${lon}&freq=${freq}
- Used to retrieve RF environment data for visualizations with location and frequency parameters
- System Health Checks
/api/check-ml-bridge
(GET)/api/check-gemma
(GET)- Used to verify if the ML bridge and Google Gemini services are operational
- Signal Classification
http://127.0.0.1:8069/api/fcc/classify_signal
(POST)- Used to classify RF signals and get FCC-related information
- Other Frontend API Usage
- Environmental variable fetching:
/.env
- JWST Calibration API (from related JS files):
http://localhost:3002/api/check-jwst-data
http://localhost:3002/api/jwst-calibration-data
- Environmental variable fetching:
REST API Documentation
System Status
- Get System Status
- URL:
/api/status
- Method: GET
- Returns status of all subsystems (signal_intel, comm_network, etc.)
- URL:
Signal Intelligence
- Get Signals
- URL:
/api/signals
- Method: GET
- Parameters: start_time, end_time, min_frequency, max_frequency
- Returns detected RF signals with classification details
- URL:
- Start Scan
- URL:
/api/scan
- Method: POST
- Starts a new RF scan with specified frequency range and duration
- URL:
- Analyze Signals
- URL:
/api/analyze
- Method: POST
- Performs analysis on detected signals, returning statistics and classifications
- URL:
Network Packet Analysis & RF Correlation
- Get Network Packets
- URL:
/api/packets
- Method: GET
- Parameters: limit, protocol, start_time, end_time
- Returns captured network packets with protocol details
- URL:
- Get Specific Packet Details
- URL:
/api/packets/{packet_id}
- Method: GET
- Returns detailed information about a specific packet
- URL:
- Get Packets for Signal
- URL:
/api/signals/{signal_id}/packets
- Method: GET
- Returns all packets correlated with a specific RF signal
- URL:
- Get Signal for Packet
- URL:
/api/packets/{packet_id}/signal
- Method: GET
- Retrieves the RF signal correlated with a specific network packet
- URL:
- Start Packet Capture
- URL:
/api/packets/capture/start
- Method: POST
- Starts capturing network packets and correlating with RF signals
- URL:
- Stop Packet Capture
- URL:
/api/packets/capture/stop
- Method: POST
- Stops the ongoing packet capture
- URL:
- Get RF Environment with Network Context
- URL:
/api/environment/rf-network
- Method: GET
- Gets RF environment information enhanced with network traffic context
- URL:
WebSocket API
The system also provides real-time updates via WebSocket connections:
- WebSocket Server:
ws://server:5001/ws
- Authentication: Send JSON with type “auth” and API key
- Subscriptions: Subscribe to specific event types (signal_detected, packet_detected, etc.)
WebSocket Message Types:
- Signal Data Messages: Real-time signal detection data
- Packet Data Messages: Network packet information
- Classification Update Messages: Changes in signal classification
- Environment Update Messages: RF environment changes
Google Gemini Integration
Google Gemini is integrated into the system through:
gemini_rf_analyzer.py
: Uses Gemini API for advanced RF signal analysisgemini_signal_classifier.py
: Offloads signal classification to Google’s servers
API Key Requirements
The system uses various API keys stored in the .env
file, including:
- GOOGLE_GEMINI_API
- HUGGING_FACE_API
- OPENAI_API_KEY
- ANTHROPIC_API_KEY
- ODOO_API_KEY
- N8N_API_KEY
- SERP_API
- NEWSAPI_ORG
- CRATE_DB
- APIFY_KEY
- NNIDIA_NIM_API
- SHODAN_API_KEY
These keys enable various AI/ML, automation, web searching, and device discovery functions within the system.