curl -X DELETE http://127.0.0.1:8005/api/v1/runs/run_abc123
(empty response body)
Delete an async job and its data
run_abc123
204 No Content
import httpx API_URL = "http://127.0.0.1:8005" def force_delete_job(job_id): # First, try to cancel if running status = httpx.get(f"{API_URL}/api/v1/runs/{job_id}").json() if status["status"] in ("queued", "running"): print(f"Cancelling job {job_id}...") httpx.post(f"{API_URL}/api/v1/runs/{job_id}/cancel") # Now delete response = httpx.delete(f"{API_URL}/api/v1/runs/{job_id}") if response.status_code == 204: print(f"Job {job_id} deleted successfully") return True else: print(f"Failed to delete: {response.json()}") return False force_delete_job("run_abc123")
400
404
500