Get Pattern Statistics

Get statistics about detected flight patterns

GET /api/v1/cannonball/patterns/stats/

Returns aggregated statistics about detected flight patterns over a specified time range.

Query Parameters

ParameterTypeDescription
hoursintegerTime range in hours (default: 24)

Response

{
  "total": 45,
  "by_type": {
    "circling": 18,
    "loitering": 12,
    "grid_search": 8,
    "speed_trap": 7
  },
  "by_confidence": {
    "high": 15,
    "medium": 22,
    "low": 8
  },
  "hours": 24
}

Response Fields

FieldTypeDescription
totalintegerTotal patterns detected in time range
by_typeobjectPattern counts by type
by_type.circlingintegerCircling patterns detected
by_type.loiteringintegerLoitering patterns detected
by_type.grid_searchintegerGrid search patterns detected
by_type.speed_trapintegerSpeed trap patterns detected
by_confidenceobjectPattern counts by confidence level
by_confidence.highintegerHigh confidence patterns
by_confidence.mediumintegerMedium confidence patterns
by_confidence.lowintegerLow confidence patterns
hoursintegerTime range used for statistics

Example Request

curl -X GET "https://api.skyspy.io/api/v1/cannonball/patterns/stats/?hours=48" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response Codes

CodeDescription
200Success
401Unauthorized - Invalid or missing authentication

Usage Notes

  • Use this endpoint for dashboard widgets and summary views
  • Combine with list endpoint for detailed pattern information
  • Higher confidence patterns are more reliable indicators of surveillance activity