Clean jobs from queue
DELETE
/api/queue/{name}/jobs
const url = 'https://example.com/api/queue/conversion/jobs?jobState=completed';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url 'https://example.com/api/queue/conversion/jobs?jobState=completed' \ --header 'Authorization: Bearer <token>'Removes all jobs in a specific state from the queue
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”name
required
Queue name
string
Example
conversionQuery Parameters
Section titled “Query Parameters”jobState
required
Job state to clean (required)
string
Responses
Section titled “Responses”Jobs cleaned successfully
Media typeapplication/json
object
status
required
Operation status
string
message
required
Status message
string
Example
{ "status": "Success", "message": "Job removed from queue"}Missing jobState parameter or failed to remove jobs
Media typeapplication/json
object
error
required
Indicates an error occurred
boolean
message
required
Error message describing what went wrong
string
Example
{ "error": true, "message": "Item not found"}