List Detected Patterns

List flight patterns detected by Cannonball analysis

GET /api/v1/cannonball/patterns/

Returns a list of detected flight patterns that may indicate surveillance or enforcement activity.

Query Parameters

ParameterTypeDescription
active_onlybooleanOnly show ongoing patterns (default: false)
hoursintegerTime range in hours (default: 24)
pattern_typestringFilter by pattern type
confidencestringFilter by confidence level
icao_hexstringFilter by aircraft ICAO hex

Response

{
  "patterns": [
    {
      "id": 1,
      "icao_hex": "A12345",
      "callsign": "N123HP",
      "pattern_type": "circling",
      "confidence": "high",
      "confidence_score": 0.92,
      "center_lat": 34.0522,
      "center_lon": -118.2437,
      "radius_nm": 0.5,
      "pattern_data": {
        "orbit_count": 5,
        "avg_radius_nm": 0.45,
        "heading_changes": 12
      },
      "started_at": "2024-01-15T12:15:00Z",
      "ended_at": null,
      "duration_seconds": 300,
      "detected_at": "2024-01-15T12:15:00Z",
      "session": 1,
      "is_active": true
    }
  ],
  "count": 15,
  "by_type": {
    "circling": 8,
    "loitering": 4,
    "grid_search": 2,
    "speed_trap": 1
  }
}

Pattern Object Fields

FieldTypeDescription
idintegerPattern ID
icao_hexstringAircraft ICAO hex code
callsignstringAircraft callsign
pattern_typestringType of pattern detected
confidencestringConfidence level: low, medium, high
confidence_scorefloat0.0-1.0 confidence score
center_latfloatCenter latitude of pattern
center_lonfloatCenter longitude of pattern
radius_nmfloatRadius in nautical miles (for circular patterns)
pattern_dataobjectPattern-specific data
started_atstringWhen pattern behavior started
ended_atstringWhen pattern ended (null if ongoing)
duration_secondsintegerPattern duration
detected_atstringWhen pattern was detected
sessionintegerAssociated session ID
is_activebooleanWhether pattern is still ongoing

Pattern Types

TypeDescription
circlingRepeated circular orbits over an area
loiteringRemaining stationary or slow-moving in a small area
grid_searchSystematic back-and-forth search pattern
speed_trapLow-altitude parallel highway flight
parallel_highwayExtended parallel highway flight
surveillanceGeneral surveillance behavior
pursuitActive pursuit pattern

Example Request

curl -X GET "https://api.skyspy.io/api/v1/cannonball/patterns/?active_only=true&hours=12" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response Codes

CodeDescription
200Success
401Unauthorized - Invalid or missing authentication