API ReferenceQueue
Cancel Job
Cancel pending extraction jobs for a file
POST
/api/v1/queue/cancelCancels all pending jobs for a specific file. Only jobs with PENDING status can be cancelled. Optionally delete the queue records entirely instead of marking them as failed.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
fileId | string | body | Yes | The file ID to cancel jobs for |
deleteRecord | boolean | body | No | Delete queue records instead of marking as failed(default: false) |
Request
const res = await fetch(
"https://app.limai.io/api/v1/queue/cancel",
{
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
fileId: "file_001",
deleteRecord: false,
}),
}
);Response
Response200
{
"cancelledCount": 2,
"deletedCount": 0,
"jobIds": [
"job_001",
"job_002"
]
}