Cloudflare Analytics are available for 1 Year through the API
Get the zones listing
1 | curl -X GET "https://api.cloudflare.com/client/v4/zones" -H "Authorization: Bearer secret" -H "Content-Type:application/json" |
Get stats on a zone
1 | curl -X GET "https://api.cloudflare.com/client/v4/zones/733d6e998f1946387c22030321e9061e/analytics/dashboard?since=2020-06-01T00:00:00Z&until=2020-06-30T23:59:00Z" -H "Authorization: Bearer secret" -H "Content-Type:application/json" > june-2020.txt |