Get Active Sessions

Get currently active Cannonball tracking sessions

GET /api/v1/cannonball/sessions/active/

Returns only the currently active tracking sessions. This is a convenience endpoint for quickly retrieving sessions that are still being tracked.

Response

{
  "sessions": [
    {
      "id": 1,
      "icao_hex": "A12345",
      "callsign": "N123HP",
      "is_active": true,
      "threat_level": "warning",
      "urgency_score": 75.0,
      "distance_nm": 2.5,
      "bearing": 45.0,
      "closing_speed_kts": 15.0,
      "last_seen": "2024-01-15T12:30:00Z",
      "pattern_count": 3,
      "alert_count": 2
    }
  ],
  "count": 1
}

Session Object Fields

FieldTypeDescription
idintegerSession ID
icao_hexstringAircraft ICAO hex code
callsignstringAircraft callsign
is_activebooleanAlways true for this endpoint
threat_levelstringCurrent threat level
urgency_scorefloat0-100 urgency rating
distance_nmfloatDistance from tracked user in nautical miles
bearingfloatBearing from tracked user
closing_speed_ktsfloatRate of approach in knots
last_seenstringISO 8601 timestamp of last position update
pattern_countintegerNumber of patterns detected in session
alert_countintegerNumber of alerts generated in session

Example Request

curl -X GET "https://api.skyspy.io/api/v1/cannonball/sessions/active/" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response Codes

CodeDescription
200Success
401Unauthorized - Invalid or missing authentication

Usage Notes

  • Use this endpoint for real-time dashboards showing current threats
  • Sessions become inactive when the aircraft leaves the area or stops transmitting
  • Typically paired with the threats endpoint for complete situational awareness