Download API #
GET /analytics/downloads #
Returns download statistics including volume, geographic distribution, bandwidth, and failure rates.
URL: GET /wp-json/dmsilm/v1/analytics/downloads
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
date_from | string | 30 days ago | Start date |
date_to | string | Today | End date |
period | string | daily | Aggregation period |
product_id | integer | null | Filter to specific product |
Response:
{
"success": true,
"data": {
"total_downloads": 3841,
"unique_customers": 892,
"failure_rate": 2.3,
"estimated_gb": 148.2,
"estimated_cost": 14.82,
"by_country": [
{ "country_code": "US", "country_name": "United States", "downloads": 1240, "percentage": 32.3 }
],
"top_files": [
{ "file_id": 12, "file_name": "pro-plugin-2.1.0.zip", "downloads": 980 }
],
"trend": [
{ "date": "2026-02-01", "downloads": 142 }
]
}
}
