Skip to main content

GET /api/history/jobs

List processing jobs for the authenticated user with pagination and filtering.

Authentication

Requires valid JWT access token in Authorization header.

Query Parameters

limit
integer
default:"50"
Maximum number of jobs to return (1-100)
offset
integer
default:"0"
Number of jobs to skip for pagination
status
string
Filter by job status: pending, processing, completed, failed, cancelled

Response

jobs
array
Array of job summaries
total
integer
Total number of jobs matching the filter
limit
integer
Limit used for this request
offset
integer
Offset used for this request

Example Request

cURL
curl -X GET 'http://localhost:8000/api/history/jobs?limit=10&status=completed' \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

{
  "jobs": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "job_type": "batch",
      "status": "completed",
      "total_documents": 25,
      "processed_count": 24,
      "failed_count": 1,
      "started_at": "2024-01-15T10:30:00Z",
      "completed_at": "2024-01-15T10:45:00Z",
      "created_at": "2024-01-15T10:29:00Z"
    }
  ],
  "total": 1,
  "limit": 10,
  "offset": 0
}

GET /api/history/jobs/

Get detailed information about a specific job including all its documents.

Authentication

Requires valid JWT access token. User must be the owner of the job.

Path Parameters

job_id
uuid
required
Unique identifier of the job

Response

id
uuid
Unique job identifier
job_type
string
Type of job: single, batch, webhook
status
string
Current status
total_documents
integer
Total documents in this job
processed_count
integer
Successfully processed documents
failed_count
integer
Failed documents
config
object
Configuration used for processing (TaggingConfig)
error_message
string
Error message if job failed
started_at
datetime
When processing started
completed_at
datetime
When processing completed
created_at
datetime
When job was created
documents
array
Array of all documents in this job

Example Request

cURL
curl -X GET 'http://localhost:8000/api/history/jobs/123e4567-e89b-12d3-a456-426614174000' \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

DELETE /api/history/jobs/

Delete a job and all its associated documents. Requires ownership.

Authentication

Requires valid JWT access token. User must be the owner of the job.

Path Parameters

job_id
uuid
required
Unique identifier of the job to delete

Response

message
string
Success message
job_id
string
ID of the deleted job

Example Request

cURL
curl -X DELETE 'http://localhost:8000/api/history/jobs/123e4567-e89b-12d3-a456-426614174000' \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

{
  "message": "Job deleted successfully",
  "job_id": "123e4567-e89b-12d3-a456-426614174000"
}

Error Responses

StatusDescription
401Unauthorized - Invalid or missing token
403Forbidden - Not the owner of this job
404Not Found - Job does not exist
500Internal Server Error

Build docs developers (and LLMs) love