---
title: "Get Namespace Stats (Batch)"
method: POST
path: "/v1/namespaces/stats/batch"
tags: ["Namespaces"]
---

# Get Namespace Stats (Batch)

`POST /v1/namespaces/stats/batch`

Returns document/bucket/collection/object counts for many namespaces in ONE call. Replaces per-row /stats fan-out on list views. Counts are aggregated in batch and live doc-counts gathered concurrently; namespaces the caller cannot see are omitted.

## Request body

- NamespaceStatsBatchRequest — Request for batch namespace stats — the visible page of namespace IDs.
  - `namespace_ids` string[], required — Namespace IDs to fetch counts for (the visible rows).

## Response `200`

Successful Response

- NamespaceStatsBatchResponse — Per-namespace stats keyed by namespace_id, returned in ONE call. Replaces the Studio namespaces-list N+1 that fired one ``GET /namespaces/{id}/stats`` per visible row (each a live MVS doc-count). Counts are batch-aggregated (buckets/collections/objects in 3 queries) and doc counts are gathered concurrently server-side.
  - `stats` object — Map of namespace_id → its counts. Namespaces the caller cannot see are omitted.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Validation Error
- `500` — Internal Server Error

---

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