Cleanup Stale Jobs
POST
/jobs/cleanup/stale/
const url = 'https://example.com/api/jobs/cleanup/stale/';const options = {method: 'POST', 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 POST \ --url https://example.com/api/jobs/cleanup/stale/ \ --header 'Authorization: Bearer <token>'Fail all stale jobs: pending >1h or running >1h.
Admin-only. Use after a failed bulk import to clean up orphaned jobs.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Successful Response
Media type application/json
StaleCleanupResponse
object
pending_failed
required
Pending Failed
integer
running_failed
required
Running Failed
integer
total_cleaned
required
Total Cleaned
integer
Example generated
{ "pending_failed": 1, "running_failed": 1, "total_cleaned": 1}