---
title: "Query asset counts by workspace for an account"
method: GET
path: "/accounts/{account_id}/reports/assetCounts"
tags: ["Report"]
---

# Query asset counts by workspace for an account

`GET /accounts/{account_id}/reports/assetCounts`

Retrieve point-in-time counts of tests, reusable flows, and datatables per workspace in an account. Only accessible by company admins.

## Path parameters

- `account_id` string, required

## Query parameters

- `workspace_id` string

## Response `200`

Asset counts per workspace in the account

- AccountAssetCountsResult — Asset counts across workspaces in an account
  - `account_id` string — The account ID
  - `aggregated` AssetCounts — Counts of tests, reusable flows, datatables, and plans
    - `test_count` integer — Total number of tests (by invariant ID)
    - `reusable_flow_count` integer — Total number of reusable flows (by invariant ID)
    - `datatable_count` integer — Total number of datatables
    - `plan_count` integer — Total number of plans (existing, non-deleted)
  - `by_workspace` WorkspaceAssetCounts[] — Per-workspace asset counts
    - `workspace_id` string — The workspace ID
    - `workspace_name` string — The workspace name
    - `counts` AssetCounts — Counts of tests, reusable flows, datatables, and plans
      - `test_count` integer — Total number of tests (by invariant ID)
      - `reusable_flow_count` integer — Total number of reusable flows (by invariant ID)
      - `datatable_count` integer — Total number of datatables
      - `plan_count` integer — Total number of plans (existing, non-deleted)

## 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)
