Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.scrubbe.com/llms.txt

Use this file to discover all available pages before exploring further.

The dashboard API provides the data that powers the Scrubbe analytics interface. Use the metrics endpoint to fetch high-level KPIs for a summary view, or the analytics endpoint for time-series and breakdown data suitable for custom dashboards and reporting. Both endpoints require Authorization: Bearer <accessToken> and live under /api/v1/dashboard.

GET /dashboard/metrics

Retrieve key performance metrics for the authenticated user’s workspace. Returns aggregate values for the current period — useful for summary cards and health indicators. Request
GET /api/v1/dashboard/metrics
Authorization: Bearer <accessToken>
Query parameters are optional and can be used to filter the time range.
from
string
ISO 8601 start date for the metrics window. Example: "2025-05-01T00:00:00Z". Defaults to 30 days ago.
to
string
ISO 8601 end date for the metrics window. Example: "2025-05-31T23:59:59Z". Defaults to the current time.
Response
{
  "success": true,
  "message": "Metrics retrieved.",
  "data": {
    "totalIncidents": 47,
    "openIncidents": 5,
    "resolvedIncidents": 42,
    "mttr": 3420,
    "mttd": 840,
    "slaBreaches": 3,
    "slaComplianceRate": 93.6,
    "criticalIncidents": 8,
    "highIncidents": 14,
    "signalsIngested": 1283,
    "period": {
      "from": "2025-05-01T00:00:00Z",
      "to": "2025-05-31T23:59:59Z"
    }
  }
}
data.totalIncidents
number
Total number of incidents created during the period.
data.openIncidents
number
Number of incidents currently open.
data.resolvedIncidents
number
Number of incidents resolved during the period.
data.mttr
number
Mean time to resolution in seconds.
data.mttd
number
Mean time to detect in seconds (from signal ingestion to incident creation).
data.slaBreaches
number
Number of incidents that exceeded their SLA threshold.
data.slaComplianceRate
number
Percentage of incidents resolved within SLA. Range: 0–100.
data.criticalIncidents
number
Count of incidents with CRITICAL severity.
data.highIncidents
number
Count of incidents with HIGH severity.
data.signalsIngested
number
Total number of signals ingested from all sources during the period.
data.period
object
The effective time range used to compute the metrics.

GET /dashboard/analytics

Retrieve detailed analytics data including time-series breakdowns, source distributions, and team performance statistics. Suitable for charting incident trends or building custom reporting pipelines. Request
GET /api/v1/dashboard/analytics
Authorization: Bearer <accessToken>
from
string
ISO 8601 start date. Defaults to 30 days ago.
to
string
ISO 8601 end date. Defaults to the current time.
granularity
string
default:"day"
Time bucket size for time-series data. One of: "hour", "day", "week".
Response
{
  "success": true,
  "message": "Analytics retrieved.",
  "data": {
    "incidentTrend": [
      { "date": "2025-05-01", "created": 4, "resolved": 3 },
      { "date": "2025-05-02", "created": 2, "resolved": 5 },
      { "date": "2025-05-03", "created": 1, "resolved": 2 }
    ],
    "severityBreakdown": {
      "CRITICAL": 8,
      "HIGH": 14,
      "MEDIUM": 19,
      "LOW": 6
    },
    "sourceBreakdown": {
      "prometheus": 22,
      "datadog": 11,
      "github": 7,
      "webhook": 7
    },
    "mttrByTeamMember": [
      {
        "userId": "usr_01HX...",
        "name": "Ada Lovelace",
        "mttr": 2700,
        "incidentsResolved": 12
      }
    ],
    "topIncidentSources": [
      { "source": "prometheus", "count": 22, "percentage": 46.8 }
    ],
    "period": {
      "from": "2025-05-01T00:00:00Z",
      "to": "2025-05-31T23:59:59Z",
      "granularity": "day"
    }
  }
}
data.incidentTrend
object[]
Time-series array of incident creation and resolution counts, bucketed by granularity.
data.severityBreakdown
object
Count of incidents per severity level during the period.
data.sourceBreakdown
object
Count of ingested signals per source during the period.
data.mttrByTeamMember
object[]
Per-user MTTR and resolved incident count, useful for understanding team performance distribution.
data.topIncidentSources
object[]
Ranked list of the sources generating the most signals, with counts and percentage share.
Use granularity=hour for real-time dashboards and granularity=week for executive summaries. The default (day) works well for weekly review charts.
Both endpoints return data scoped to the authenticated user’s workspace. Users with the VIEWER role can read analytics data but cannot modify incidents or configuration.