Getting the country packet report for the current month
Note
This endpoint does not use the regular DataHub API authentication. Authentication is performed with a separate static token (configuration value COUNTRY_STATS_API_TOKEN) that is transmitted as a Bearer token in the Authorization header.
Sends a GET request to the endpoint /country-packet-reports.
Description
The List-Country-Packet-Reports request allows the user to request the aggregated country packet report for the current month. For each country, the report contains the sum of the packets from the mitigations that ended in the reporting month, sorted by packet count in descending order.
The system re-aggregates the data every hour. The aggregation requires the feature flag COUNTRY_STATS_ENABLED; otherwise, the report stays empty.
Requirements
Values of the request: none
Objects: none
Request
To request the report for the current month, no additional information needs to be added to the path of the request.
As a result, the user gets a list of country entries in data and a meta object with details about the reporting period.
The country entries provide the following information:
| Attributes | Description | Values |
|---|---|---|
country |
The ISO country code of the country. | string |
packets |
The aggregated number of packets for the country in the reporting month. | integer |
The meta object provides the following information:
| Attributes | Description | Values |
|---|---|---|
period_start |
The first day of the reporting month in the format YYYY-MM-DD. |
string($date) |
period_end |
The last day of the reporting month in the format YYYY-MM-DD. |
string($date) |
last_updated_at |
The date and time of the last aggregation in ISO 8601 format; null if no data has been aggregated yet. |
string($date-time) |
Example
Example response:
{
"data": [
{
"country": "DE",
"packets": 3023924
},
{
"country": "US",
"packets": 953069
},
{
"country": "NL",
"packets": 561701
}
],
"meta": {
"period_start": "2026-06-01",
"period_end": "2026-06-30",
"last_updated_at": "2026-06-30T23:05:00+00:00"
}
}
Responses
The following responses are available:
| STATUS CODE | DESCRIPTION |
|---|---|
| 200 | The request has succeeded. |
| 401 | The request has not succeeded because the Authorization header is missing or does not contain a Bearer token. |
| 403 | The request has not succeeded because the transmitted token is invalid. |