Browse API

Purge old Job Runs

Human-confirm an exact plan for removable unheld Runs.

POST/api/v0/projects/<key>/jobs/<job>/purge

Request

POST https://repopack.com/api/v0/projects/<key>/jobs/<job>/purge
Authorization: Bearer <token>

With job.manage, the server prepares an exact plan of completed unheld/unfrozen Runs eligible for deletion. An unreadable project or missing manager authority is refused by the project authorization check (401 or 403), and an unknown Job returns 404. A rolling-channel binding refuses the action (409, job_rolling_channels_bound) until the channel is removed through its own guarded flow. The first accepted request returns a human confirmation challenge; it does not delete Runs. If the plan changes before execution, the result is 409 job_purge_plan_changed with a fresh plan. A partial cleanup reports 500 job_purge_partial with removed, remaining and a recovery instruction. Do not reuse an old confirmation or blindly retry a timed-out purge: inspect the action, Job and Run list first. Successful confirmed execution returns ok:true and the purge result. This preserves the Job and held/active evidence; ordinary retention is a different process.