Get Batch
client.batches.get(stringbatchID, BatchGetParams { expand, organization_id, project_id } query?, RequestOptionsoptions?): BatchGetResponse { id, config, project_id, 5 more }
GET/api/v2/batches/{batch_id}
Get Batch
import LlamaCloud from '@llamaindex/llama-cloud';
const client = new LlamaCloud({
apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted
});
const batch = await client.batches.get('batch_id');
console.log(batch.id);{
"id": "id",
"config": {
"job": {
"configuration_id": "cfg-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"type": "parse_v2"
}
},
"project_id": "project_id",
"source_directory_id": "source_directory_id",
"status": "PENDING",
"created_at": "2019-12-27T18:11:19.117Z",
"results": [
{
"source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"error_message": "error_message",
"job_reference": {
"id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"type": "parse_v2"
}
}
],
"updated_at": "2019-12-27T18:11:19.117Z"
}Returns Examples
{
"id": "id",
"config": {
"job": {
"configuration_id": "cfg-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"type": "parse_v2"
}
},
"project_id": "project_id",
"source_directory_id": "source_directory_id",
"status": "PENDING",
"created_at": "2019-12-27T18:11:19.117Z",
"results": [
{
"source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"error_message": "error_message",
"job_reference": {
"id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"type": "parse_v2"
}
}
],
"updated_at": "2019-12-27T18:11:19.117Z"
}