> ## Documentation Index
> Fetch the complete documentation index at: https://www.octoparse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ワークスペースを削除

> 下書きを破棄。未公開なら識別子もカスケード削除。

**`DELETE`** `https://api-datahub.octoparse.com/v1/data-apps/{app_id}/workspace`

認証：APIキー必須（`Authorization: Bearer <API Key>`）。App 作者のみ。他者は `404`。

下書きを破棄。Release が無ければ識別子もカスケード削除（未公開の空殻を残さない。履歴名の束縛は解放）。

下書き欠落が常に即 `404` とは限らない: 下書きなし・Release 0 の識別子（履歴孤児）は空ワークスペース表現で返ることがある。

## リクエスト

### パスパラメータ

<ParamField path="app_id" type="string" required>
  App reference.
</ParamField>

### リクエスト例

```bash theme={null}
curl -X DELETE \
  -H "Authorization: Bearer $OCTOPARSE_API_KEY" \
  "https://api-datahub.octoparse.com/v1/data-apps/carol/reviews-query/workspace"
```

## レスポンス

### 200 成功

```json theme={null}
{
  "data": {
    "deleted": false,
    "app_deleted": false
  }
}
```

ペイロードは `data` に包まれます。フィールド:

<ResponseField name="deleted" type="boolean" required>
  下書きが削除されたか。
</ResponseField>

<ResponseField name="app_deleted" type="boolean">
  —
</ResponseField>

### エラー

| HTTP | `code`                | `category`  | Description                   |
| ---- | --------------------- | ----------- | ----------------------------- |
| 401  | `unauthorized`        | `forbidden` | API キー欠落または無効。                |
| 404  | `workspace-not-found` | `not_found` | 進行中の下書きがない。通常の主経路状態であり故障ではない。 |

エラー応答は `{"error": {code, category, message, retryable}}` です。<a href="/docs/jp/datahub/api/reference/introduction#errors">エラー</a> を参照。

## クライアントライブラリ

Python / JavaScript SDK はまだこのエンドポイントをラップしていません。REST を直接呼び出してください。
