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>'
import requests

url = "https://api.mixpeek.com/v1/analytics/performance/batches/{batch_id}/diagnostics"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.mixpeek.com/v1/analytics/performance/batches/{batch_id}/diagnostics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mixpeek.com/v1/analytics/performance/batches/{batch_id}/diagnostics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.mixpeek.com/v1/analytics/performance/batches/{batch_id}/diagnostics"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.mixpeek.com/v1/analytics/performance/batches/{batch_id}/diagnostics")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.mixpeek.com/v1/analytics/performance/batches/{batch_id}/diagnostics")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "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>"
  ]
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}

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 | null

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