Get Current Threats

Returns real-time threat data from pattern analysis

GET /api/v1/cannonball/threats/

Returns the current list of detected threats from the Cannonball analysis engine. Threats are cached and updated in real-time as aircraft data is processed.

Query Parameters

ParameterTypeDescription
max_rangefloatMaximum distance in nautical miles to include
threat_levelstringFilter by threat level: info, warning, or critical

Response

{
  "threats": [
    {
      "icao_hex": "A12345",
      "callsign": "N123HP",
      "lat": 34.0522,
      "lon": -118.2437,
      "altitude": 1500,
      "ground_speed": 85,
      "track": 270,
      "distance_nm": 2.5,
      "bearing": 45.0,
      "closing_speed": 15.0,
      "threat_level": "warning",
      "urgency_score": 75.0,
      "is_known_le": true,
      "identification_method": "database",
      "identification_reason": "Known LAPD helicopter",
      "operator_name": "Los Angeles Police Department",
      "agency_name": "LAPD Air Support Division",
      "agency_type": "local",
      "patterns": [
        {
          "type": "circling",
          "confidence": "high",
          "duration_seconds": 300
        }
      ]
    }
  ],
  "count": 1,
  "total_detected": 3,
  "timestamp": "2024-01-15T12:30:00Z"
}

Threat Object Fields

FieldTypeDescription
icao_hexstringAircraft ICAO hex code
callsignstringAircraft callsign (may be null)
latfloatCurrent latitude
lonfloatCurrent longitude
altitudeintegerAltitude in feet
ground_speedintegerGround speed in knots
trackintegerTrack/heading in degrees
distance_nmfloatDistance from user in nautical miles
bearingfloatBearing from user in degrees
closing_speedfloatRate of approach in knots (negative = departing)
threat_levelstringThreat classification: info, warning, critical
urgency_scorefloat0-100 urgency rating
is_known_lebooleanWhether aircraft is in known LE database
identification_methodstringHow the aircraft was identified
identification_reasonstringHuman-readable identification reason
operator_namestringAircraft operator name
agency_namestringLaw enforcement agency name
agency_typestringAgency type: federal, state, local, military
patternsarrayActive flight patterns detected

Example Request

curl -X GET "https://api.skyspy.io/api/v1/cannonball/threats/?max_range=10&threat_level=warning" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response Codes

CodeDescription
200Success
401Unauthorized - Invalid or missing authentication