---
title: "delete completed job (erase content but keep run id)"
method: POST
path: "/w/{workspace}/jobs/completed/delete/{id}"
tags: ["job"]
---

# delete completed job (erase content but keep run id)

`POST /w/{workspace}/jobs/completed/delete/{id}`

## Path parameters

- `workspace` string, required
- `id` string, uuid, required

## Response `200`

job details

- CompletedJob
  - `workspace_id` string
  - `id` string, uuid, required
  - `parent_job` string, uuid
  - `created_by` string, required
  - `created_at` string, date-time, required
  - `started_at` string, date-time, required
  - `completed_at` string, date-time
  - `duration_ms` integer, required
  - `success` boolean, required
  - `script_path` string
  - `script_hash` string
  - `args` ScriptArgs — The arguments to pass to the script or flow
  - `result` unknown
  - `logs` string
  - `deleted` boolean
  - `raw_code` string
  - `canceled` boolean, required
  - `canceled_by` string
  - `canceled_reason` string
  - `job_kind` 'script' | 'preview' | 'dependencies' | 'flow' | 'flowdependencies' | 'appdependencies' | 'flowpreview' | 'script_hub' | 'identity' | 'deploymentcallback' | 'singlestepflow' | 'flowscript' | 'flownode' | 'appscript' | 'aiagent' | 'unassigned_script' | 'unassigned_flow' | 'unassigned_singlestepflow', required
  - `schedule_path` string
  - `permissioned_as` string, required — The user (u/userfoo) or group (g/groupfoo) whom the execution of this script will be permissioned_as and by extension its DT_TOKEN.
  - `flow_status` FlowStatus — unresolved $ref
  - `workflow_as_code_status` WorkflowStatus
    - `scheduled_for` string, date-time
    - `started_at` string, date-time
    - `duration_ms` number
    - `name` string
  - `raw_flow` FlowValue — unresolved $ref
  - `is_flow_step` boolean, required
  - `language` 'python3' | 'deno' | 'go' | 'bash' | 'powershell' | 'postgresql' | 'mysql' | 'bigquery' | 'snowflake' | 'mssql' | 'oracledb' | 'graphql' | 'nativets' | 'bun' | 'php' | 'rust' | 'ansible' | 'csharp' | 'nu' | 'java' | 'ruby' | 'rlang' | 'duckdb' | 'bunnative' | 'dbt'
  - `is_skipped` boolean, required
  - `email` string, required
  - `visible_to_owner` boolean, required
  - `mem_peak` integer
  - `tag` string, required
  - `priority` integer
  - `labels` string[]
  - `self_wait_time_ms` number
  - `aggregate_wait_time_ms` number
  - `preprocessed` boolean
  - `is_retry` boolean
  - `resolved` boolean — whether this failure has been marked as handled
  - `resolved_by` string — who resolved the failure. Enterprise-only, so also absent for a manual resolution outside enterprise; use resolved_automatically to tell the two apart
  - `resolved_at` string, date-time
  - `resolution_note` string
  - `resolved_automatically` boolean — true when a succeeding retry resolved this rather than a person. Explicit rather than inferred from an absent resolved_by, which is also absent for a manual resolution outside enterprise
  - `trigger_kind` 'webhook' | 'default_email' | 'email' | 'schedule' | 'http' | 'websocket' | 'postgres' | 'kafka' | 'nats' | 'mqtt' | 'amqp' | 'sqs' | 'gcp' | 'azure' | 'google' | 'github' | 'asset' | 'freshness' | 'app' | 'ui' — job trigger kind (schedule, http, websocket...)
  - `worker` string

---

[API](https://skmtc.net/windmill/apis/windmill-api.md) · [All operations](https://skmtc.net/windmill/apis/windmill-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/windmill/windmill-api/revisions/c3a7465c46bb/schema)
