Trillet AI logo

Get Batch Progress

Get the job counters and percent complete for a batch call operation

GEThttps://api.trillet.ai/v1/api/batch-calls/{batchId}/status

Headers

x-workspace-idstringrequired

Workspace identifier for the API.

Path Parameters

batchIdstringrequired

The 10-character batch ID returned by Start Batch Calls.

Response

batchIdstring

The batch ID.

totalnumber

Total jobs in the batch

completednumber

Dial jobs that finished

failednumber

Dial jobs that failed. Cancelled calls are not counted here.

cancellednumber

Calls cancelled before they were dialled, by Cancel Batch Operation, Cancel Batch Job or Cancel Batch Contact.

waitingnumber

Jobs waiting in the queue

activenumber

Jobs currently being placed

progressnumber

Percent of jobs completed, rounded to a whole number (0-100). Failed jobs are not counted as completed.

lastUpdatednumber

Time these counters were read, in Unix milliseconds.

Example Usage

curl -X GET "https://api.trillet.ai/v1/api/batch-calls/k3j9x0a1bq/status" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-workspace-id: YOUR_WORKSPACE_ID"

Example Response

{
  "batchId": "k3j9x0a1bq",
  "total": 150,
  "completed": 95,
  "failed": 5,
  "cancelled": 0,
  "waiting": 45,
  "active": 5,
  "progress": 63,
  "lastUpdated": 1793284800000
}

Error Responses

errorstring

Error message describing what went wrong

Common Error Codes:

  • 404 - Batch not found: the batch doesn't exist or belongs to another workspace
  • 500 - Server error retrieving batch progress

Counters are kept for 7 days. After that, or before a scheduled batch starts, every counter reads 0. Use Get Batch Status for the batch's overall status.

Last updated on