Dashboards API
Dashboard metrics, analytics, time series, and custom dashboard endpoints.
Dashboard Overview
/api/v1/dashboard/overviewGet high-level dashboard summary
Returns aggregated metrics across all user projects including log counts, error rates, active users, and health status.
// Response
{
"status": "success",
"data": {
"summary": {
"totalLogs": 45230,
"totalErrors": 520,
"errorRate": 1.15,
"totalProjects": 5,
"averageResponseTime": 187
},
"health": {
"healthyProjects": 4,
"warningProjects": 1,
"criticalProjects": 0
},
"realTime": {
"activeUsers": 23,
"currentRPS": 45
},
"topIssues": {
"mostFrequentError": "TypeError: Cannot read properties",
"slowestEndpoint": "/api/reports/generate"
},
"trends": {
"logVolumeChange": 12.5,
"errorRateChange": -2.3
}
}
}Comprehensive Metrics
/api/v1/dashboard/metricsGet detailed metrics with time range filtering
| Parameter | Type | Description |
|---|---|---|
timeRange | string | "1h", "24h", "7d", "30d" (default: "24h") |
projectId | string | Filter by specific project (optional) |
Real-Time Metrics
/api/v1/dashboard/realtimeGet current real-time metrics
Returns live data including current request rate, active sessions, and most recent errors. This endpoint is optimized for frequent polling (every 10-30 seconds).
// Response
{
"status": "success",
"data": {
"currentRPS": 45,
"activeUsers": 23,
"recentErrors": [
{
"message": "TypeError: Cannot read...",
"timestamp": "2026-03-07T10:35:12Z",
"count": 3
}
],
"uptimePercent": 99.97
}
}Time Series Data
/api/v1/dashboard/timeseriesGet time-bucketed log data for charts
| Parameter | Type | Description |
|---|---|---|
timeRange | string | Time range for the series |
granularity | string | "minute", "hour", "day" |
metric | string | "logCount", "errorRate", "responseTime" |
// Response
{
"status": "success",
"data": {
"series": [
{ "timestamp": "2026-03-07T00:00:00Z", "value": 1230 },
{ "timestamp": "2026-03-07T01:00:00Z", "value": 980 },
{ "timestamp": "2026-03-07T02:00:00Z", "value": 450 },
{ "timestamp": "2026-03-07T03:00:00Z", "value": 320 }
],
"granularity": "hour",
"metric": "logCount"
}
}Error Analysis
/api/v1/dashboard/errorsGet error analysis and grouping data
Returns errors grouped by message, with occurrence counts, first/last seen timestamps, and affected environments.
Performance Metrics
/api/v1/dashboard/performanceGet performance analysis data
// Response
{
"status": "success",
"data": {
"averageResponseTime": 187,
"p95ResponseTime": 450,
"p99ResponseTime": 890,
"slowestEndpoints": [
{ "endpoint": "/api/reports/generate", "responseTime": 2340 },
{ "endpoint": "/api/export/csv", "responseTime": 1870 }
],
"pageLoadTimes": [
{ "page": "/dashboard", "loadTime": 1200 },
{ "page": "/logs", "loadTime": 980 }
],
"networkStats": {
"totalRequests": 45230,
"failureRate": 0.8,
"averageRequestTime": 145,
"slowRequests": 23
}
}
}Custom Dashboards
Create personalized dashboards with configurable widgets:
/api/v1/custom-dashboardsCreate a custom dashboard
// Request body
{
"name": "Frontend Performance",
"description": "Web vitals and page load metrics",
"projectId": "proj_abc123",
"widgets": [
{
"type": "timeseries",
"title": "Page Load Times",
"config": {
"metric": "responseTime",
"timeRange": "24h",
"granularity": "hour"
},
"position": { "x": 0, "y": 0, "w": 6, "h": 4 }
},
{
"type": "stat",
"title": "Error Rate",
"config": {
"metric": "errorRate",
"timeRange": "24h"
},
"position": { "x": 6, "y": 0, "w": 3, "h": 2 }
}
]
}/api/v1/custom-dashboardsList user's custom dashboards
/api/v1/custom-dashboards/:idUpdate a custom dashboard
/api/v1/custom-dashboards/:idDelete a custom dashboard
Data Export
/api/v1/dashboard/exportExport dashboard data in various formats
// Request body
{
"format": "csv", // "csv" or "json"
"timeRange": "7d",
"projectId": "proj_abc123",
"metrics": ["logCount", "errorRate", "responseTime"]
}Info
GET /api/v1/insights/:projectId/invalidate