---
title: "Get Namespace Buckets Health"
method: GET
path: "/v1/analytics/buckets/health"
tags: ["Analytics", "Analytics - Buckets"]
---

# Get Namespace Buckets Health

`GET /v1/analytics/buckets/health`

Get health for ALL buckets in the namespace in one request.

Batch counterpart of GET /{bucket_id}/health: two grouped analytics
queries cover the whole namespace instead of a query fan-out per bucket.
Buckets with no events in the window are omitted from the response and
should be treated as healthy.

**Use Cases:**
- Monitoring dashboards listing many buckets (replaces the per-bucket
  health call fan-out that scaled linearly with bucket count)
- Alerting sweeps over all buckets

**Example:**
```bash
curl -X GET "https://api.mixpeek.com/v1/analytics/buckets/health?hours=24" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Namespace: your-namespace"
```

## Query parameters

- `hours` integer — Hours of history

## Response `200`

Successful Response

- NamespaceBucketsHealthResponse — Batch health for all buckets in the namespace (single request). Replaces the per-bucket GET /{bucket_id}/health fan-out on monitoring surfaces (browser N+1 that scaled with bucket count, MS-1024). Only buckets with events in the window appear — a bucket absent from `buckets` had no errors and no sync activity and should render as healthy.
  - `time_range` ApiAnalyticsBucketsModelsTimeRange, required — Time range for analytics queries.
    - `start` string, date-time, required — Start of time range
    - `end` string, date-time, required — End of time range
  - `buckets` BucketHealthResponse[], required — Per-bucket health, one entry per bucket with events in the window. Absent bucket == healthy/no activity.
    - `bucket_id` string, required — Bucket identifier
    - `time_range` ApiAnalyticsBucketsModelsTimeRange, required — Time range for analytics queries.
      - `start` string, date-time, required — Start of time range
      - `end` string, date-time, required — End of time range
    - `overall_health` string, required — Overall health status
    - `total_errors` integer, required — Total error count
    - `error_breakdown` ErrorBreakdown[], required — Errors by type
      - `error_type` string, required — Error type
      - `count` integer, required — Error count
      - `percentage` number, required — Percentage of total errors
      - `first_seen` string, date-time, required — First occurrence
      - `last_seen` string, date-time, required — Last occurrence
    - `sync_health` SyncHealthMetric[], required — Sync health per config
      - `sync_config_id` string, required — Sync config identifier
      - `consecutive_failures` integer, required — Consecutive failure count
      - `last_success_at` string, date-time, nullable — Last successful sync
      - `last_failure_at` string, date-time, nullable — Last failed sync
      - `failure_rate` number, required — Failure rate (0-1)
    - `stuck_syncs` string[], required — Sync configs with no recent activity

## 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/revisions/40af5e67ba94/schema)
