cURL
curl --request GET \ --url https://api.example.com/dashboard/stats
{ "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" }
Get aggregated statistics for your API key
x-api-key
curl -X GET "https://tornado.velys.software/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'; }