POST /api/batch/start
Start a new batch processing job. This is an alternative to the WebSocket endpoint for scenarios where you want to start a job and poll for status updates.Authentication
Requires valid JWT access token in Authorization header.Request Body
Array of documents to process
Tagging configuration
Optional column mapping for custom CSV structures
Optional client-generated job ID. Server generates one if not provided.
Response
Unique identifier for the batch job
Number of documents to process
Success message
Example Request
cURL
Example Response
GET /api/batch/jobs//status
Get the current status of a batch processing job.Authentication
Requires valid JWT access token.Path Parameters
Job identifier
Response
Job identifier
Current status:
pending, processing, completed, failed, cancelled, pausedTotal documents in job
Number of processed documents
Number of failed documents
Progress percentage (0.0 - 1.0)
Example Request
cURL
POST /api/batch/jobs//cancel
Cancel a running batch processing job.Authentication
Requires valid JWT access token.Path Parameters
Job identifier
Response
Confirmation message
Job identifier
Example Request
cURL
POST /api/batch/jobs//pause
Pause a running batch processing job. Processing will stop after the current document completes.Authentication
Requires valid JWT access token.Path Parameters
Job identifier
Response
Confirmation message
Example Request
cURL
Paused jobs can be resumed later. This is useful for managing API rate limits or temporarily stopping processing.
POST /api/batch/jobs//resume
Resume a paused batch processing job.Authentication
Requires valid JWT access token.Path Parameters
Job identifier
Response
Confirmation message
Example Request
cURL
GET /api/batch/active
Get a list of all active (running or paused) batch jobs for the current user.Authentication
Requires valid JWT access token.Response
Array of active job summaries
Example Request
cURL
Example Response
Job Control Workflow
Control execution
Use pause/resume/cancel as needed
- Pause: Temporarily stop (e.g., for rate limit management)
- Resume: Continue from where it paused
- Cancel: Stop permanently
Polling vs WebSocket
- Polling (Job Control API)
- WebSocket
Pros:
- Simple HTTP requests
- Works with any HTTP client
- No persistent connection needed
- Higher latency (polling interval)
- More network overhead
- No real-time updates
- Running batch jobs from scripts
- Backend-to-backend integration
- Firewall blocks WebSocket
Recommended Polling Interval
Error Responses
| Status | Description |
|---|---|
| 400 | Bad Request - Invalid job ID or parameters |
| 401 | Unauthorized - Invalid or missing token |
| 404 | Not Found - Job does not exist |
| 409 | Conflict - Job is in invalid state for this operation |
| 500 | Internal Server Error |