Skip to main content

Get Summary

Returns aggregated security metrics for the organization (or a single device) over a given time window.
GET /api/analytics/summary

Query Parameters

ParameterTypeRequiredDescription
windowstringYes24h or 30d
device_idstringNoScope to a specific device

Response

{
  "total_analyzed": 48210,
  "dangerous_blocks": 34,
  "risky_warnings": 182,
  "avg_classification_ms": 12.4
}
FieldTypeDescription
total_analyzednumberTotal URLs classified
dangerous_blocksnumberURLs blocked as malicious
risky_warningsnumberURLs flagged as potentially harmful
avg_classification_msnumberMean classification latency (ms)

Get Time Series

Returns time-bucketed data for charting. Buckets are hourly for 24h and daily for 30d.
GET /api/analytics/series

Query Parameters

ParameterTypeRequiredDescription
metricstringYesOne of total_analyzed, dangerous_blocks, risky_warnings, avg_classification_ms
windowstringYes24h or 30d
device_idstringNoScope to a specific device

Response

{
  "metric": "dangerous_blocks",
  "window": "24h",
  "data": [
    { "timestamp": "2025-10-14T00:00:00Z", "value": 2 },
    { "timestamp": "2025-10-14T01:00:00Z", "value": 0 },
    { "timestamp": "2025-10-14T02:00:00Z", "value": 5 }
  ]
}

Health Check

Returns 200 OK if the API is reachable. No authentication required.
GET /api/analytics/health

Response

{ "status": "ok" }