List Batches
batches.list(BatchListParams**kwargs) -> SyncPaginatedCursor[BatchListResponse]
GET/api/v2/batches
List batches for the current project.
List Batches
import os
from llama_cloud import LlamaCloud
client = LlamaCloud(
api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted
)
page = client.batches.list()
page = page.items[0]
print(page.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
}