Get batch status
/v1/batches/{batch_id}
Retrieve the status and progress of a batch processing job.
Path Parameters
batch_id: string
The batch ID to retrieve
Returns
batch_count: number
Total number of decisions in the batch
batch_id: string
Unique identifier for the batch
cancelled_count: number
Number of decisions that were cancelled
download_url: string
URL to download results when complete
error_count: number
Number of decisions that failed
pending_count: number
Number of decisions in progress
success_count: number
Number of decisions successfully completed
upload_url: string
Upload URL (null after batch is created)
policy_id: optional string
Policy ID applied to batch items
policy_version: optional string
Policy version applied to batch items
Get batch status
curl https://api.safetykit.com/v1/batches/$BATCH_ID \
-H "Authorization: Bearer $SAFETYKIT_API_KEY"
{
"batch_count": 2000,
"batch_id": "batch_01hf89meedvef6pc00njv3ezh0",
"batch_status": "SUCCESS",
"cancelled_count": 0,
"download_url": "https://safetykit-batch-downloads-production.s3.us-west-2.amazonaws.com/...",
"error_count": 0,
"pending_count": 540,
"success_count": 1460,
"upload_url": null,
"policy_id": "",
"policy_version": ""
}
Returns Examples
{
"batch_count": 2000,
"batch_id": "batch_01hf89meedvef6pc00njv3ezh0",
"batch_status": "SUCCESS",
"cancelled_count": 0,
"download_url": "https://safetykit-batch-downloads-production.s3.us-west-2.amazonaws.com/...",
"error_count": 0,
"pending_count": 540,
"success_count": 1460,
"upload_url": null,
"policy_id": "",
"policy_version": ""
}