Cancel Batch Job
client.beta.batch.cancel(stringjobID, BatchCancelParams { organization_id, project_id, reason, temporalNamespace } params, RequestOptionsoptions?): BatchCancelResponse { job_id, message, processed_items, status }
POST/api/v1/beta/batch-processing/{job_id}/cancel
Cancel a running batch processing job.
Stops processing and marks all pending items as cancelled. Items currently being processed may complete depending on their state.
Parameters
jobID: string
Returns
Cancel Batch Job
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 response = await client.beta.batch.cancel('job_id');
console.log(response.job_id);{
"job_id": "job_id",
"message": "message",
"processed_items": 0,
"status": "pending"
}Returns Examples
{
"job_id": "job_id",
"message": "message",
"processed_items": 0,
"status": "pending"
}