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

# Get Bucket Health

`GET /v1/analytics/buckets/{bucket_id}/health`

## Request

- Base URL: `https://api.mixpeek.com`
- URL: `https://api.mixpeek.com/v1/analytics/buckets/{bucket_id}/health`
- Auth: HTTP bearer and API key in header `X-Namespace`

Get bucket health monitoring metrics.

Analyzes bucket health including:
- Error breakdown by type
- Sync health per configuration
- Stuck/failing syncs
- Overall health status

**Use Cases:**
- Monitor bucket health
- Identify failing syncs
- Debug errors by type
- Alert on unhealthy buckets

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

## Path parameters

- `bucket_id` string, required

## Query parameters

- `hours` integer: Hours of history

## Response `200`

Successful Response

- BucketHealthResponse: Bucket health monitoring response.
  - `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`: Unprocessable Entity
- `429`: Too Many Requests
- `500`: Internal Server Error
- `503`: Service Unavailable

## Changes

- **2026-10-09** `61a175e8eb9a`: 1 warning, 5 info
  - removed the optional property `detail` from the response with the `422` status
  - added the non-success response with the status `429`
  - added the non-success response with the status `503`
  - added the optional property `success` to the response with the `422` status
  - …2 more
- **2026-08-09** `5d4c905106b4`: 1 info
  - the endpoint scheme security `BearerAuth AND NamespaceHeader` was added to the API

[Operation history](https://skmtc.dev/mixpeek/apis/mixpeek-api/changes/v1/analytics/buckets/:bucket_id/health/get.md)

---

[API](https://skmtc.dev/mixpeek/apis/mixpeek-api.md) - [All operations](https://skmtc.dev/mixpeek/apis/mixpeek-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mixpeek/apis/mixpeek-api/revisions/790bc16455f6?raw)
