Bucket Syncs

Get Sync Metrics

Changed on

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.

get/v1/buckets/{bucket_id}/syncs/{sync_config_id}/metrics

Request

  • Base URL: https://api.mixpeek.com
  • URL: https://api.mixpeek.com/v1/buckets/{bucket_id}/syncs/{sync_config_id}/metrics
  • Auth: HTTP bearer and API key in header X-Namespace

Path parameters

bucket_idstring required
sync_config_idstring required

Response

Successful Response

sync_config_idstring required
statusstring required

Sync config status (e.g. ACTIVE).

is_activeboolean required
pausedboolean
total_files_discoveredinteger
total_files_syncedinteger
total_files_failedinteger
batches_createdinteger
sync_run_counterinteger
consecutive_failuresinteger
last_errorstring nullable
last_sync_atstring date-time nullable
next_sync_atstring date-time nullable
seconds_since_last_syncinteger nullable

Age of last successful sync; None if never synced.

is_staleboolean

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_syncnumber nullable

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.

stale_after_secondsinteger nullable

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

failure_ratenumber

total_files_failed / total_files_discovered (0..1).

healthyboolean

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

dlq_totalinteger

Objects stuck after all retries.

dlq_by_errorobject

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

running_jobboolean
stalledboolean

The running job has made no progress: no heartbeat, or nothing discovered or synced, for longer than max(stale_after_seconds, 300). A first run that has not finished yet has no last sync to be stale against, so this is how it reports a stall. Folds into healthy.

stalled_reasonstring nullable

Why the running job counts as stalled, when it does.

last_jobobject nullable

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

Example response

{
  "intervals_since_last_sync": 0.4,
  "stale_after_seconds": 600
}

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status