Skip to main content

List jobs

GET /queue/jobs
Auth: API Key required

Query parameters

limit
number
default:"50"
Maximum number of jobs to return (pagination).
offset
number
default:"0"
Number of jobs to skip (pagination offset).
status
string
Filter by job status. One of: pending, running, completed, error, cancelled.

Response

{
  "jobs": [
    {
      "id": "job_abc123",
      "filePath": "videos/clip.mp4",
      "status": "completed",
      "priority": 1,
      "progress": 100,
      "startedAt": "2024-03-15T10:30:00.000Z",
      "completedAt": "2024-03-15T10:31:45.000Z",
      "error": null
    }
  ],
  "limit": 50,
  "offset": 0,
  "count": 1
}
jobs
array
count
number
Total jobs in the current result set.

Example

# List all failed jobs
curl "http://localhost:3000/queue/jobs?status=error&limit=20" \
  -H "Authorization: Bearer <api_key>"

Retry job

POST /queue/jobs/{jobId}/retry
Re-queues a failed job for processing. Auth: API Key required

Path parameters

jobId
string
required
ID of the job to retry. Must have error status.

Response

{
  "success": true,
  "message": "Job queued for retry"
}
Status codes: 200 success · 400 job not in error state · 500 error

Example

curl -X POST http://localhost:3000/queue/jobs/job_abc123/retry \
  -H "Authorization: Bearer <api_key>"

Cancel job

POST /queue/jobs/{jobId}/cancel
Cancels a pending job before it starts processing. Auth: API Key required

Path parameters

jobId
string
required
ID of the job to cancel. Must have pending status.

Response

{
  "success": true,
  "message": "Job cancelled"
}
Status codes: 200 success · 400 job not pending · 500 error

Example

curl -X POST http://localhost:3000/queue/jobs/job_abc123/cancel \
  -H "Authorization: Bearer <api_key>"

Delete job

DELETE /queue/jobs/{jobId}
Permanently removes a job record from the queue. Auth: API Key required

Path parameters

jobId
string
required
ID of the job to delete.

Response

{
  "success": true,
  "message": "Job deleted"
}
Status codes: 200 success · 400 failed · 500 error

Example

curl -X DELETE http://localhost:3000/queue/jobs/job_abc123 \
  -H "Authorization: Bearer <api_key>"

Queue Statistics

Aggregate counts per status.

Queue Events (SSE)

Real-time progress updates.

Video Status

Check processing status by file path.