Delete a commit
delete_commitDestructive and irreversible. Deletes a commit's data, build image, or both (by job_id). keep_data and keep_image default to false: both resources are removed and the deployment disappears from list_deployments. keep_image=true stops the release and removes its disk copy and logs, keeping the commit deployable from its image. keep_data=true removes only the build image; stop the release first, including sleeping releases. Either single-resource choice keeps the commit in the timeline. Refuses the canonical commit and both keep options together. Main volumes and their restore points are kept. Space with dependent copies is freed after the next promote cleanup; image storage is reclaimed by registry cleanup. Starting or redeploying a commit whose image was removed rebuilds it; rebuild before promoting. Requires a read-write token.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | the deployment job id to delete (from list_deployments); the canonical commit is refused | |
| keep_data | No | keep the commit's disk copy and logs; defaults to false | |
| keep_image | No | keep the build image; defaults to false |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| status | No | present, and always "pending_approval", only when this call was parked instead of run immediately because the project's (or kad-back's own) plan-mode setting requires a human to approve it first | |
| message | Yes | ||
| plan_id | No | poll get_plan_status with this id for the eventual outcome | |
| approve_at | No | the kad.dev dashboard URL a human approves or rejects this plan from | |
| expires_in_s | No | the plan can no longer be approved after this many seconds |