Documentation

Summary Statistics

High-level overview of the alert system. By default returns core counts and unique city/zone numbers. Use the include parameter to opt-in to top cities, top zones, a time-series timeline, and peak-hour detection - perfect for building dashboards with a single API call.

GEThttps://sirenapi.orielhaim.com/stats/summary

Returns aggregated alert statistics with optional sections

Query Parameters

ParameterTypeDescriptionDefaultRequired
startDateISO 8601Filter data from this date onwardsall timeno
endDateISO 8601Filter data until this datenowno
originstringFilter by alert origin(s), comma-separated (e.g. gaza,lebanon)all originsno
includestringComma-separated optional sections: topCities, topZones, topOrigins, timeline, peak- (none)no
topLimitintegerNumber of items in topCities / topZones (1-50)5no
timelineGroupenumGrouping interval for timeline: hour, day, week, or monthdayno

The include Parameter

Each value adds an optional section to the response. Combine multiple with commas: include=topCities,timeline,peak. Only requested sections are computed - keeping the default response fast.

ValueFields AddedUse CaseControlled By
topCitiestopCities[] - city, zone, countLeaderboard of most targeted citiestopLimit
topZonestopZones[] - zone, countRegional breakdowntopLimit
timelinetimeline[] - period, countCharts and time-series graphstimelineGroup
peakpeak - period, countIdentify the busiest hour in range-
topOriginstopOrigins[] - origin, countBreakdown by alert origin / threat sourcetopLimit

Timeline Grouping Formats

When using include=timeline, the timelineGroup parameter controls the bucket size and the format of the period field.

timelineGroupPeriod FormatRecommended For
hour2024-12-01T14:00:00ZHourly buckets - best for short ranges (1-7 days)
day2024-12-01Daily buckets - best for weeks to months
week2024-W48Weekly buckets - best for months to a year
month2024-12Monthly buckets - best for long-term trends

Example Requests

Core stats only - totals, unique cities and zones

bash
1GET https://sirenapi.orielhaim.com/stats/summary

Response Structure

Always included

FieldTypeDescription
totals.rangenumberTotal alerts in the requested date range (or all time)
totals.last24hnumberAlerts in the last 24 hours
totals.last7dnumberAlerts in the last 7 days
totals.last30dnumberAlerts in the last 30 days
uniqueCitiesnumberNumber of distinct cities with alerts in range
uniqueZonesnumberNumber of distinct zones with alerts in range
uniqueOriginsnumberNumber of distinct alert origins in range

Optional - requires include

FieldTypeDescriptioninclude
topCities[].citystringCity nametopCities
topCities[].zonestringZone the city belongs totopCities
topCities[].countnumberAlert count for this citytopCities
topZones[].zonestringZone nametopZones
topZones[].countnumberAlert count for this zonetopZones
timeline[].periodstringTime bucket label (format depends on timelineGroup)timeline
timeline[].countnumberAlert count in this periodtimeline
peak.periodstringThe peak hour (ISO format)peak
peak.countnumberAlert count during the peak hourpeak
topOrigins[].originstringOrigin name (e.g. gaza, lebanon)topOrigins
topOrigins[].countnumberAlert count from this origintopOrigins

Example Responses

GET https://sirenapi.orielhaim.com/stats/summary - no include, fastest possible response

json
1{
2 "totals": {
3 "range": 284500,
4 "last24h": 312,
5 "last7d": 2840,
6 "last30d": 12400
7 },
8 "uniqueCities": 1580,
9 "uniqueZones": 42
10}