---
title: "Get Org Catalog Stats"
method: GET
path: "/api/organization/catalog/stats"
tags: ["catalog"]
---

# Get Org Catalog Stats

`GET /api/organization/catalog/stats`

## Request

- Base URL: `https://app.myriade.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://app.myriade.ai/api/organization/catalog/stats`
- Auth: none declared

Filter-chip counts for the org-wide catalog, computed server-side.

The skeleton payload has no columns, so the client can no longer count
them. Aggregate in SQL so large governed catalogs do not need to load and
serialize every asset merely to compute six counters.

The counts are faceted: every chip counts under the OTHER active filters,
never under its own. A chip that counted itself would report its own total
and leave every sibling at zero; one that ignored the rest promised rows
the list could not deliver ("Published 22" landing on 4 with a tag on).

Status, pending-suggestion and open-question are already the GROUP BY of
``_aggregate_db_stat_rows``, so their per-chip exclusion is arithmetic over
the returned groups. Tag and asset type narrow the SQL: the semantic layer's
kind chips (Metrics / Models / Terms) sit in the same band as the counted
chips, so a count that ignored them would disagree with the list next to
it.

Text search deliberately does NOT reach here: matching it exactly would
mean replaying search_catalog_page's COLUMN-to-parent fold in the
aggregate, and two copies of that predicate would drift. The client hides
the badges while a text query is active instead.

## Query parameters

- `database_id` string, nullable
- `surface` 'all' | 'list'
- `tag_ids` string[], nullable
- `statuses` string[], nullable
- `has_pending_suggestion` string, nullable
- `has_open_questions` string, nullable
- `asset_type` string, nullable

## Cookies

- `session` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/myriade/apis/myriade-bi-api.md) · [All operations](https://skmtc.dev/myriade/apis/myriade-bi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/myriade/apis/myriade-bi-api/revisions/15b7cb96ca80?raw)
