Skip to main content
GET
Get Sync Metrics

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 header returns 403; an invalid or revoked key returns 401.

X-Namespace
string
header
required

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.

Path Parameters

bucket_id
string
required
sync_config_id
string
required

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_id
string
required
status
string
required

Sync config status (e.g. ACTIVE).

is_active
boolean
required
paused
boolean
default:false
total_files_discovered
integer
default:0
total_files_synced
integer
default:0
total_files_failed
integer
default:0
batches_created
integer
default:0
sync_run_counter
integer
default:0
consecutive_failures
integer
default:0
last_error
string | null
last_sync_at
string<date-time> | null
next_sync_at
string<date-time> | null
seconds_since_last_sync
integer | null

Age of last successful sync; None if never synced.

is_stale
boolean
default:false

True when a continuous sync has not progressed for more than TWO of its own polling intervals. Previously the bar was three intervals OR 600 seconds, whichever was larger, so a one-minute sync could miss ten consecutive runs and still read healthy while an hourly one got three. Read it beside intervals_since_last_sync and stale_after_seconds rather than on its own.

intervals_since_last_sync
number | null

How overdue the sync is, measured in its OWN polling intervals: seconds_since_last_sync / polling_interval_seconds. 1.0 means one interval has elapsed, which is normal for a sync about to run. None when the sync has never run. Present so a caller can judge lateness without knowing where the threshold happens to sit.

Example:

0.4

stale_after_seconds
integer | null

The threshold is_stale was evaluated against, in seconds, so the verdict can be checked rather than trusted. max(2 * polling_interval_seconds, 120).

Example:

600

failure_rate
number
default:0

total_files_failed / total_files_discovered (0..1).

healthy
boolean
default:true

Composite: active, not paused, no consecutive failures, not stale. Because it folds in is_stale, a sync more than two intervals overdue reports healthy=false rather than true.

dlq_total
integer
default:0

Objects stuck after all retries.

dlq_by_error
Dlq By Error · object

DLQ counts grouped by normalized error reason (IDs stripped).

running_job
boolean
default:false
last_job
Last Job · object | null

Summary of the most recent job: status, files_synced/failed, throughput_files_per_min, duration_seconds.