cURL
curl --request GET \ --url https://api.tornadoapi.io/dashboard/stats \ --header 'x-api-key: <x-api-key>'
{ "total_jobs": 1523, "pending_jobs": 5, "processing_jobs": 12, "completed_jobs": 1450, "failed_jobs": 56, "storage_used_bytes": 53687091200, "storage_used_gb": 50.0, "client_name": "My Application", "avg_processing_time_seconds": 45.2, "today_throughput_bytes": 1073741824 }
Get aggregated statistics for your API key
null
curl -X GET "https://api.tornadoapi.io/dashboard/stats" \ -H "x-api-key: sk_your_api_key"
{ "error": "Missing x-api-key header" }
async function loadStats(apiKey) { const response = await fetch('/dashboard/stats', { headers: { 'x-api-key': apiKey } }); const stats = await response.json(); document.getElementById('total').textContent = stats.total_jobs; document.getElementById('completed').textContent = stats.completed_jobs; document.getElementById('failed').textContent = stats.failed_jobs; document.getElementById('processing').textContent = stats.pending_jobs + stats.processing_jobs; document.getElementById('storage').textContent = stats.storage_used_gb.toFixed(2) + ' GB'; }