Skip to main content
GET
/
v1
/
analytics
/
performance
/
batches
/
{batch_id}
/
diagnostics
Get Batch Diagnostics
curl --request GET \
  --url https://api.mixpeek.com/v1/analytics/performance/batches/{batch_id}/diagnostics \
  --header 'Authorization: Bearer <token>'
{
  "batch_id": "<string>",
  "batch_name": "<string>",
  "status": "<string>",
  "bucket_id": "<string>",
  "current_tier": 0,
  "total_tiers": 1,
  "overall_progress": 0,
  "created_at": "2023-11-07T05:31:56Z",
  "submitted_at": "2023-11-07T05:31:56Z",
  "started_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "duration_seconds": 123,
  "estimated_completion": "2023-11-07T05:31:56Z",
  "tiers": [
    {
      "tier_num": 123,
      "status": "<string>",
      "task_id": "<string>",
      "started_at": "2023-11-07T05:31:56Z",
      "completed_at": "2023-11-07T05:31:56Z",
      "duration_seconds": 123,
      "progress": {
        "processed_documents": 0,
        "total_documents": 0,
        "percentage": 0
      },
      "ray_job_id": "<string>",
      "ray_dashboard_url": "<string>",
      "error": "<string>",
      "error_type": "<string>",
      "requires_gpu": true,
      "ray_job_status": "<string>"
    }
  ],
  "collections": [
    {
      "collection_id": "<string>",
      "collection_name": "<string>",
      "status": "<string>",
      "document_count": 0,
      "expected_documents": 123
    }
  ],
  "performance_summary": {},
  "insights": [
    {
      "type": "<string>",
      "severity": "<string>",
      "message": "<string>",
      "stage": "<string>",
      "metric_value": 123,
      "recommendation": "<string>"
    }
  ],
  "has_failures": false,
  "failed_tier_count": 0,
  "health": "ok",
  "blocked_reason": "<string>",
  "stuck_seconds": 123,
  "total_objects": 0,
  "next_actions": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

batch_id
string
required

Response

Successful Response

Comprehensive batch diagnostics response.

Combines batch status, task progress, collection info, and performance insights into a single response for easy frontend rendering.

batch_id
string
required

Batch ID

batch_name
string
required

Batch name

status
string
required

Overall batch status

bucket_id
string
required

Source bucket ID

current_tier
integer
default:0

Current tier being processed

total_tiers
integer
default:1

Total number of tiers

overall_progress
number
default:0

Overall progress percentage (0-100)

created_at
string<date-time> | null

When batch was created

submitted_at
string<date-time> | null

When batch was submitted

started_at
string<date-time> | null

When processing started

completed_at
string<date-time> | null

When processing completed

duration_seconds
number | null

Total duration in seconds

estimated_completion
string<date-time> | null

Estimated completion time

tiers
TierDiagnostic · object[]

Diagnostic info for each tier

collections
CollectionDiagnostic · object[]

Status of target collections

performance_summary
Performance Summary · object

Performance metrics summary (available after completion)

insights
PerformanceInsight · object[]

Performance insights and recommendations

has_failures
boolean
default:false

Whether batch has any failures

failed_tier_count
integer
default:0

Number of failed tiers

health
string
default:ok

Derived health signal: 'ok', 'scaling' (PROCESSING with no progress yet but still inside the GPU cold-start / cluster-provisioning window — a scale-from-zero node and image pull can take ~20 min, so this is expected, not stuck), 'stuck' (PROCESSING but no progress and the active tier's job has been PENDING past the cold-start window — its driver/worker may be unschedulable), or 'degraded' (has partial failures).

blocked_reason
string | null

Human-readable reason the batch appears stuck/blocked, or — for health='scaling' — why it is legitimately waiting (e.g. 'cluster_cold_start: GPU workers scaling from zero'). None when health is 'ok' or 'degraded'.

stuck_seconds
number | null

How long the batch has been making no progress while PROCESSING, in seconds. None when not stuck.

total_objects
integer
default:0

Total objects in batch

next_actions
string[]

Recommended next steps for user