---
title: "Query workspace event metrics over a date range"
method: GET
path: "/workspaces/{workspace_id}/reports/eventMetrics"
tags: ["Report"]
---

# Query workspace event metrics over a date range

`GET /workspaces/{workspace_id}/reports/eventMetrics`

Retrieve daily counts of registered event metrics (e.g. auto_heal_insights) for a single workspace. Each metric in the response carries customer-facing copy — a display name, description, benefit statement, benefit categories, and cost levers — so callers (e.g. the mabl MCP server) can present the data with consistent framing. Backed by the precomputed workspace_event_metric_daily fact table. Accessible to any workspace member (same authorization as quality metrics).

## Path parameters

- `workspace_id` string, required

## Query parameters

- `metric_names` string
- `start_date` string
- `end_date` string

## Response `200`

Event metric series for the workspace over the date range

- WorkspaceEventMetricsResult — Daily counts of registered event metrics for a single workspace, enriched with customer-facing copy for each metric.
  - `workspace_id` string — The workspace ID
  - `start_date` string — Inclusive start of the date range (YYYY-MM-DD)
  - `end_date` string — Inclusive end of the date range (YYYY-MM-DD)
  - `metrics` WorkspaceEventMetric[] — One entry per metric name, ordered by metric_name. Each entry carries the total count for the range, an optional daily breakdown, and the metric's customer-facing copy.
    - `metric_name` string — Stable identifier for the metric (e.g. auto_heal_insights)
    - `display_name` string — Customer-facing label for the metric, matching the Account Value dashboard (e.g. "Auto-heals applied")
    - `aggregation` 'sum' | 'max' — How this metric aggregates over the date range. "sum" (the default for count metrics) means `count` is the additive total and daily values are counts. "max" means the metric is a daily maximum: `peak` carries the single highest day, `count` is not populated, and daily values are maxima that must not be summed with each other or with sum metrics.
    - `count` integer — Total count of this metric in the workspace across the date range. Present only for aggregation "sum" metrics; omitted for "max" metrics (use `peak`).
    - `peak` integer — The single highest daily value over the range, for aggregation "max" metrics (e.g. peak concurrent runs). Present only when aggregation is "max". Do not sum this with other metrics — it is a maximum, not a total.
    - `daily_counts` WorkspaceEventMetricDailyCount[] — Per-day values within the range. Days with zero activity are omitted (sparse). Returned in date-ascending order. For "sum" metrics these are counts; for "max" metrics these are that day's maximum.
      - `date` string — Calendar day (YYYY-MM-DD)
      - `count` integer — Count of events for this metric in the workspace on this day
    - `description` string — One- or two-sentence explanation of what the metric counts. Customer-facing.
    - `benefit` string — One- or two-sentence statement of what mabl is doing for the customer when this metric increments. Customer-facing.
    - `benefit_categories` string[] — Tags grouping the metric by operational outcome (e.g. false_failure_prevented, defect_escape_reduced, engineering_time_saved). Consumers can group metrics by category to compose audience-appropriate reports.
    - `cost_levers` string[] — Tags grouping the metric by what kind of cost it reduces (e.g. labor_cost, defect_cost, opportunity_cost). Consumers can roll up metrics by lever when converting activity to dollar figures.

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized to access this workspace
- `default` — Unexpected error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
