Skip to main content
POST
Get Namespace Stats (Batch)

Authorizations

Authorization
string
header
required

Mixpeek API key, sent as Authorization: Bearer mxp_sk_.... Create one in Studio under Settings → API Keys, or with an admin key via POST /v1/organizations/users/{user_email}/api-keys. A missing, malformed, unknown, revoked, inactive or expired key returns 401; a key without the permission, scope or plan an operation needs returns 403.

Body

application/json

Keys this body does not declare are ignored, and the response's warnings name them, until 2026-11-02; from 2026-11-02 they are refused with 422 extra_forbidden naming the accepted keys.

Request for batch namespace stats — the visible page of namespace IDs.

namespace_ids
string[]
required

Namespace IDs to fetch counts for (the visible rows).

Maximum array length: 100

Response

Successful Response

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
Stats · object

Map of namespace_id → its counts. Namespaces the caller cannot see are omitted.