---
title: "Query quality metrics across all workspaces in account"
method: POST
path: "/accounts/{account_id}/reports/qualityMetrics/statusOverTime"
tags: ["Report"]
---

# Query quality metrics across all workspaces in account

`POST /accounts/{account_id}/reports/qualityMetrics/statusOverTime`

Retrieve aggregated quality metrics (pass/fail/stopped counts) across all workspaces in an account over a time range. Only accessible by company admins.

## Path parameters

- `account_id` string, required

## Query parameters

- `timezone` string
- `workspace_id` string

## Request body

- TestSuiteFilterOptions
  - `application_ids` string[] — Application IDs to filter by
  - `environment_ids` string[] — Environment IDs to filter by
  - `triggering_resource_ids` string[] — Triggering resource IDs to filter by
  - `test_name` string — Test name to filter by (partial match)
  - `test_type` 'api' | 'browser' | 'performance' | 'mobile' — Type of test
  - `browser` string — The browser for the run
  - `execution_source` 'mabl_cloud' | 'external' | 'mabl_local' | 'mabl_agent' — Where the test lives
  - `mobile_platform` 'android' | 'ios' — The mobile platform associated with this object
  - `test_labels` string[] — Test labels to filter by
  - `plan_labels` string[] — Plan labels to filter by
  - `start_time` integer — The start time of the time period
  - `end_time` integer — The end time of the time period

## Response `200`

Account quality metrics across all workspaces

- AccountQualityMetricsOverTimeResult — Quality metrics across all workspaces in an account over a time range
  - `account_id` string — The account ID
  - `from_time` integer — Start of the query time range in epoch milliseconds
  - `to_time` integer — End of the query time range in epoch milliseconds
  - `aggregated` TestSuiteStatusOverTimeResult
    - `test_suite_status_over_time` TestSuiteStatus[] — Status of the test suite at discrete times in the range
      - `workspace_id` string — The ID of the workspace
      - `start_time` integer — Earliest time associated with this test suite status summary, deployment event time if applicable
      - `end_time` integer — Latest time associated with this test suite status summary, deployment event time if applicable
      - `deployment_event_id` string — The deployment event associated with this status summary, if applicable
      - `count_tests_pass` integer — The count of passing test runs associated with this summary
      - `count_tests_fail` integer — The count of failing test runs associated with this summary
      - `count_tests_stopped` integer — The count of stopped test runs associated with this summary
      - `count_tests_distinct` integer — The count of distinct tests whose runs are associated with this summary
      - `count_active_plans` integer — The count of distinct active plans (plans with at least one test run) associated with this summary
      - `count_plan_runs` integer — The count of plan runs associated with this summary
      - `count_plan_runs_failed` integer — The count of failed plan runs associated with this summary
      - `categorized_failures` FailureCategoryCount[] — The counts of each failure category
        - `failure_category` string — The type of failure
        - `count` integer — The count of the failure category
    - `status_by_deployment` boolean — True if deployment event IDs supplied in filters, otherwise false
    - `end_time` integer — The latest time represented in these results
    - `start_time` integer — The earliest time represented in these results
    - `cursor` string — Cursor used for pagination
    - `total_distinct_tests` integer — The total count of distinct tests across the entire date range
    - `total_active_plans` integer — The total count of distinct active plans across the entire date range
    - `total_plan_runs` integer — The total count of plan runs across the entire date range
    - `retried_test_run_count` integer — Count of test runs within the date range whose parent plan run was a retry. Used to show how many test executions were covered by retry-on-failure.
    - `retried_test_run_passed_count` integer — Subset of retried_test_run_count whose final status was success. The ratio indicates how often retry-on-failure successfully avoids human triage.
  - `by_workspace` WorkspaceQualityMetrics[] — Per-workspace breakdown of quality metrics
    - `workspace_id` string — The workspace ID
    - `workspace_name` string — The workspace name
    - `metrics` TestSuiteStatusOverTimeResult
      - `test_suite_status_over_time` TestSuiteStatus[] — Status of the test suite at discrete times in the range
        - `workspace_id` string — The ID of the workspace
        - `start_time` integer — Earliest time associated with this test suite status summary, deployment event time if applicable
        - `end_time` integer — Latest time associated with this test suite status summary, deployment event time if applicable
        - `deployment_event_id` string — The deployment event associated with this status summary, if applicable
        - `count_tests_pass` integer — The count of passing test runs associated with this summary
        - `count_tests_fail` integer — The count of failing test runs associated with this summary
        - `count_tests_stopped` integer — The count of stopped test runs associated with this summary
        - `count_tests_distinct` integer — The count of distinct tests whose runs are associated with this summary
        - `count_active_plans` integer — The count of distinct active plans (plans with at least one test run) associated with this summary
        - `count_plan_runs` integer — The count of plan runs associated with this summary
        - `count_plan_runs_failed` integer — The count of failed plan runs associated with this summary
        - `categorized_failures` FailureCategoryCount[] — The counts of each failure category
          - `failure_category` string — The type of failure
          - `count` integer — The count of the failure category
      - `status_by_deployment` boolean — True if deployment event IDs supplied in filters, otherwise false
      - `end_time` integer — The latest time represented in these results
      - `start_time` integer — The earliest time represented in these results
      - `cursor` string — Cursor used for pagination
      - `total_distinct_tests` integer — The total count of distinct tests across the entire date range
      - `total_active_plans` integer — The total count of distinct active plans across the entire date range
      - `total_plan_runs` integer — The total count of plan runs across the entire date range
      - `retried_test_run_count` integer — Count of test runs within the date range whose parent plan run was a retry. Used to show how many test executions were covered by retry-on-failure.
      - `retried_test_run_passed_count` integer — Subset of retried_test_run_count whose final status was success. The ratio indicates how often retry-on-failure successfully avoids human triage.

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized (not a company admin)
- `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)
