List Batches
client.batches.list(BatchListParams { created_at_on_or_after, created_at_on_or_before, organization_id, 5 more } query?, RequestOptionsoptions?): PaginatedCursor<BatchListResponse { id, config, project_id, 5 more } >
GET/api/v2/batches
List Batches
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
});
// Automatically fetches more pages as needed.
for await (const batchListResponse of client.batches.list()) {
console.log(batchListResponse.id);
}{
"items": [
{
"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"
}
],
"next_page_token": "next_page_token",
"total_size": 0
}Returns Examples
{
"items": [
{
"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"
}
],
"next_page_token": "next_page_token",
"total_size": 0
}