Retrieve Batch
Retrieve the current state of a batch job, forcing a live status refresh.
Retrieve the current state of a batch job. Unlike
List batches, this forces a live status
check - poll this endpoint until status is
completed, failed, expired, or cancelled.
GET /v1/batches/:batch_idPath parameters
batch_idstringrequiredThe id of the batch.
Response
idstringoptionalobject'batch'optionalendpointstringoptionalinput_file_idstringoptionalcompletion_windowstringoptionalstatusstringoptionalOne of validating, in_progress, finalizing, completed,
failed, expired, cancelling, cancelled.
output_file_idstring | nulloptionalSet once results are ready. Download with
GET /v1/files/:file_id/content.
error_file_idstring | nulloptionalSet when one or more lines failed.
errorsobject | nulloptionalWhy the batch failed, when it did:
{ object: 'list', data: [{ code, message, param, line }] }. Only
message is filled in. null when there is no batch-level error.
request_countsobjectoptional{ total, completed, failed }.
metadataobject | nulloptionalcreated_atintegeroptionalin_progress_atinteger | nulloptionalfinalizing_atinteger | nulloptionalcompleted_atinteger | nulloptionalfailed_atinteger | nulloptionalexpired_atinteger | nulloptionalcancelled_atinteger | nulloptionalexpires_atinteger | nulloptionalPolling recommendation
Poll every 30-60 seconds. Once output_file_id is set, the batch is
billed automatically (at the 50% discount) and results become
available via the Files API.
Errors
| Status | Reason |
|---|---|
404 | Batch not found or belongs to another workspace. |