Get Sync Metrics
Operational metrics for a sync in one call.
Folds config totals + health/staleness + the DLQ failure breakdown (grouped by normalized error reason) + the most-recent job’s throughput into a single response — so callers can see “is this sync healthy / is anything backlogged” without stitching /jobs and /dlq or reading logs.
Authorizations
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 header returns 403; an invalid or revoked key returns 401.
Namespace id (ns_...), not the namespace name. This scopes the request rather than authenticating it, and it is required on every operation marked x-mixpeek-namespace-scoped.
Response
Successful Response
Operational metrics for a sync configuration, in one call.
Folds together what previously required stitching the config + /jobs + /dlq: lifetime totals, health/staleness, the DLQ failure breakdown (grouped by normalized error reason), and the most-recent job's throughput. Lets callers answer "is this sync healthy and is anything backlogged?" without circumventing the API with kubectl/log spelunking.
Sync config status (e.g. ACTIVE).
Age of last successful sync; None if never synced.
True when a continuous sync hasn't progressed within ~3x its polling interval.
total_files_failed / total_files_discovered (0..1).
Composite: active, not paused, no consecutive failures, not stale.
Objects stuck after all retries.
DLQ counts grouped by normalized error reason (IDs stripped).
Summary of the most recent job: status, files_synced/failed, throughput_files_per_min, duration_seconds.

