List Cannonball Alerts

List alerts generated by Cannonball analysis

GET /api/v1/cannonball/alerts/

Returns a list of alerts generated by the Cannonball analysis system. Alerts are created when threats are detected, patterns are identified, or aircraft behavior changes significantly.

Query Parameters

ParameterTypeDescription
hoursintegerTime range in hours (default: 24)
unacknowledgedbooleanOnly show unacknowledged alerts (default: false)
alert_typestringFilter by alert type
prioritystringFilter by priority: info, warning, critical
acknowledgedbooleanFilter by acknowledgement status

Response

{
  "alerts": [
    {
      "id": 1,
      "session_icao": "A12345",
      "alert_type": "le_detected",
      "priority": "warning",
      "title": "Law Enforcement Aircraft Detected",
      "distance_nm": 2.5,
      "acknowledged": false,
      "created_at": "2024-01-15T12:30:00Z"
    }
  ],
  "count": 15,
  "unacknowledged": 8
}

Alert Object Fields (List View)

FieldTypeDescription
idintegerAlert ID
session_icaostringAircraft ICAO hex from associated session
alert_typestringType of alert
prioritystringAlert priority level
titlestringAlert title
distance_nmfloatDistance at time of alert
acknowledgedbooleanWhether alert has been acknowledged
created_atstringAlert creation timestamp

Alert Types

TypeDescription
le_detectedLaw enforcement aircraft detected
pattern_detectedSuspicious flight pattern detected
closing_fastAircraft approaching at high speed
overheadAircraft directly overhead
new_threatNew threat identified
threat_escalatedThreat level increased
threat_clearedThreat has departed or been cleared

Priority Levels

PriorityDescription
infoInformational alert
warningWarning - increased attention recommended
criticalCritical - immediate attention required

Example Request

curl -X GET "https://api.skyspy.io/api/v1/cannonball/alerts/?unacknowledged=true&priority=critical" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response Codes

CodeDescription
200Success
401Unauthorized - Invalid or missing authentication