---
title: 削除したジョブを復元
description: 削除から 30 日未満のジョブを履歴に戻します。
canonical_url: https://orchestor.io/docs/rest-api/endpoint-reference/jobs/post-restore-job
markdown_url: https://orchestor.io/docs/rest-api/endpoint-reference/jobs/post-restore-job.md
---

# 削除したジョブを復元

削除から 30 日未満のジョブを履歴に戻します。

```http
POST /v1/creative/jobs/{id}/restore
```

Server: https://api.orchestor.io

Operation ID: `restoreCreativeJob`

## Authentication

```json
[
  [
    {
      "key": "bearerAuth",
      "type": "http",
      "description": "外部 API キー。session は受け付けません。apiKey と同時に送ると 401 です。",
      "scheme": "bearer",
      "scopes": []
    }
  ],
  [
    {
      "key": "apiKey",
      "type": "apiKey",
      "description": "外部 API キー。bearerAuth と同時に送ると 401 です。",
      "name": "x-api-key",
      "in": "header",
      "scopes": []
    }
  ],
  [
    {
      "key": "session_cookie",
      "type": "apiKey",
      "description": "自社 App の同一 origin セッション。",
      "name": "wos-session",
      "in": "cookie",
      "scopes": []
    }
  ]
]
```

## Parameters

```json
[
  {
    "name": "id",
    "in": "path",
    "required": true,
    "description": "同じワークスペース内のジョブ ID。",
    "schema": {
      "type": "string"
    }
  }
]
```

## Responses

### 200

```json
{
  "statusCode": "200",
  "description": "ジョブを履歴に復元しました。",
  "headers": [],
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "name": "JobRestoreResponse",
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "job_id",
              "status"
            ],
            "properties": {
              "job_id": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enumValues": [
                  "restored"
                ]
              }
            }
          }
        }
      }
    }
  ]
}
```

### 401

```json
{
  "statusCode": "401",
  "description": "認証が必要です。",
  "headers": [
    {
      "name": "x-orchestor-request-id",
      "in": "header",
      "required": false,
      "description": "HTTP リクエストの相関 ID。ジョブの request_id とは別の値。",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "ratelimit-limit",
      "in": "header",
      "required": false,
      "description": "現在の期間で許可されるリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-remaining",
      "in": "header",
      "required": false,
      "description": "現在の期間で残っているリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-reset",
      "in": "header",
      "required": false,
      "description": "制限がリセットされるまでの秒数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "retry-after",
      "in": "header",
      "required": false,
      "description": "再試行までの待機秒数。",
      "schema": {
        "type": "integer"
      }
    }
  ],
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "name": "ErrorEnvelope",
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "description": "失敗理由と再試行に必要な情報。失敗していなければ null。",
            "required": [
              "code",
              "message",
              "request_id",
              "category",
              "stage",
              "retryable",
              "retry_after_seconds",
              "public_reason",
              "next_action"
            ],
            "properties": {
              "code": {
                "name": "CreativeErrorCode",
                "type": "string",
                "description": "失敗原因を識別する機械処理向けコード。message の文字列で分岐しないでください。",
                "enumValues": [
                  "bad_request",
                  "invalid_request",
                  "unknown_parameter",
                  "unauthorized",
                  "session_not_accepted",
                  "insufficient_funds",
                  "not_enough_credits",
                  "api_key_spend_limit_exceeded",
                  "insufficient_scope",
                  "open_key_route_not_allowed",
                  "open_key_required",
                  "not_found",
                  "project_not_found",
                  "canvas_template_not_found",
                  "canvas_share_not_found",
                  "canvas_share_passphrase_required",
                  "idempotency_conflict",
                  "draft_expired",
                  "job_not_completed",
                  "job_failed",
                  "job_canceled",
                  "job_generation_already_started",
                  "job_not_cancelable",
                  "webhook_not_configured",
                  "job_not_terminal",
                  "asset_upload_incomplete",
                  "top_up_in_dashboard",
                  "payload_too_large",
                  "asset_too_large",
                  "unsupported_media_type",
                  "queue_full",
                  "rate_limited",
                  "provider_rate_limited",
                  "internal_error",
                  "billing_in_dashboard",
                  "provider_submission_failed",
                  "provider_unavailable",
                  "content_moderated",
                  "input_rejected",
                  "provider_capacity_exceeded",
                  "provider_not_configured",
                  "database_busy",
                  "deploy_draining",
                  "overloaded",
                  "replica_not_ready",
                  "api_key_auth_unavailable",
                  "asset_storage_unavailable",
                  "video_analysis_failed"
                ]
              },
              "message": {
                "type": "string",
                "description": "利用者に表示できる処理結果または失敗理由の説明。"
              },
              "request_id": {
                "pattern": "^req_[a-f0-9]{32}$",
                "type": "string",
                "description": "この生成または HTTP 要求を追跡する ID。HTTP の相関 ID とジョブ ID は別に記録します。"
              },
              "category": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力、認証、課金、生成など、失敗原因の分類。"
              },
              "stage": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力検証、受付、生成、決済など、失敗が発生した段階。"
              },
              "retryable": {
                "type": "boolean",
                "description": "入力を変えずに後から再試行できるかどうか。"
              },
              "retry_after_seconds": {
                "type": "integer",
                "nullable": true,
                "description": "同じ要求を再試行するまで待つ秒数。再試行不要なら null。"
              },
              "public_reason": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "利用者に公開できる失敗理由の識別子。"
              },
              "next_action": {
                "type": "string",
                "description": "次に必要な操作。値に従って入力修正、待機、状態確認、結果取得などを行います。",
                "enumValues": [
                  "fix_input",
                  "authenticate",
                  "add_funds",
                  "retry_later",
                  "poll_status",
                  "inspect_events",
                  "contact_support"
                ]
              },
              "details": {
                "description": "失敗原因を調べるための補足情報。内容はエラーコードごとに異なります。"
              }
            }
          }
        }
      },
      "example": {
        "error": {
          "code": "unauthorized",
          "message": "認証が必要です。有効な API キーと認証ヘッダーを確認してください。",
          "request_id": "req_00000000000000000000000000000000",
          "category": "authentication",
          "stage": "authentication",
          "retryable": false,
          "retry_after_seconds": null,
          "public_reason": "unauthorized",
          "next_action": "authenticate"
        }
      }
    }
  ]
}
```

### 403

```json
{
  "statusCode": "403",
  "description": "API キーの権限または利用上限により要求が拒否されました。従量課金の USD 残高が生成料金に足りない場合は not_enough_credits を返し、ジョブと予約を作りません。",
  "headers": [
    {
      "name": "x-orchestor-request-id",
      "in": "header",
      "required": false,
      "description": "HTTP リクエストの相関 ID。ジョブの request_id とは別の値。",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "ratelimit-limit",
      "in": "header",
      "required": false,
      "description": "現在の期間で許可されるリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-remaining",
      "in": "header",
      "required": false,
      "description": "現在の期間で残っているリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-reset",
      "in": "header",
      "required": false,
      "description": "制限がリセットされるまでの秒数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "retry-after",
      "in": "header",
      "required": false,
      "description": "再試行までの待機秒数。",
      "schema": {
        "type": "integer"
      }
    }
  ],
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "name": "ErrorEnvelope",
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "description": "失敗理由と再試行に必要な情報。失敗していなければ null。",
            "required": [
              "code",
              "message",
              "request_id",
              "category",
              "stage",
              "retryable",
              "retry_after_seconds",
              "public_reason",
              "next_action"
            ],
            "properties": {
              "code": {
                "name": "CreativeErrorCode",
                "type": "string",
                "description": "失敗原因を識別する機械処理向けコード。message の文字列で分岐しないでください。",
                "enumValues": [
                  "bad_request",
                  "invalid_request",
                  "unknown_parameter",
                  "unauthorized",
                  "session_not_accepted",
                  "insufficient_funds",
                  "not_enough_credits",
                  "api_key_spend_limit_exceeded",
                  "insufficient_scope",
                  "open_key_route_not_allowed",
                  "open_key_required",
                  "not_found",
                  "project_not_found",
                  "canvas_template_not_found",
                  "canvas_share_not_found",
                  "canvas_share_passphrase_required",
                  "idempotency_conflict",
                  "draft_expired",
                  "job_not_completed",
                  "job_failed",
                  "job_canceled",
                  "job_generation_already_started",
                  "job_not_cancelable",
                  "webhook_not_configured",
                  "job_not_terminal",
                  "asset_upload_incomplete",
                  "top_up_in_dashboard",
                  "payload_too_large",
                  "asset_too_large",
                  "unsupported_media_type",
                  "queue_full",
                  "rate_limited",
                  "provider_rate_limited",
                  "internal_error",
                  "billing_in_dashboard",
                  "provider_submission_failed",
                  "provider_unavailable",
                  "content_moderated",
                  "input_rejected",
                  "provider_capacity_exceeded",
                  "provider_not_configured",
                  "database_busy",
                  "deploy_draining",
                  "overloaded",
                  "replica_not_ready",
                  "api_key_auth_unavailable",
                  "asset_storage_unavailable",
                  "video_analysis_failed"
                ]
              },
              "message": {
                "type": "string",
                "description": "利用者に表示できる処理結果または失敗理由の説明。"
              },
              "request_id": {
                "pattern": "^req_[a-f0-9]{32}$",
                "type": "string",
                "description": "この生成または HTTP 要求を追跡する ID。HTTP の相関 ID とジョブ ID は別に記録します。"
              },
              "category": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力、認証、課金、生成など、失敗原因の分類。"
              },
              "stage": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力検証、受付、生成、決済など、失敗が発生した段階。"
              },
              "retryable": {
                "type": "boolean",
                "description": "入力を変えずに後から再試行できるかどうか。"
              },
              "retry_after_seconds": {
                "type": "integer",
                "nullable": true,
                "description": "同じ要求を再試行するまで待つ秒数。再試行不要なら null。"
              },
              "public_reason": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "利用者に公開できる失敗理由の識別子。"
              },
              "next_action": {
                "type": "string",
                "description": "次に必要な操作。値に従って入力修正、待機、状態確認、結果取得などを行います。",
                "enumValues": [
                  "fix_input",
                  "authenticate",
                  "add_funds",
                  "retry_later",
                  "poll_status",
                  "inspect_events",
                  "contact_support"
                ]
              },
              "details": {
                "description": "失敗原因を調べるための補足情報。内容はエラーコードごとに異なります。"
              }
            }
          }
        }
      },
      "example": {
        "error": {
          "code": "insufficient_scope",
          "message": "API キーの権限が不足しています。必要な権限を持つ API キーを指定してください。",
          "request_id": "req_00000000000000000000000000000000",
          "category": "authorization",
          "stage": "authorization",
          "retryable": false,
          "retry_after_seconds": null,
          "public_reason": "insufficient_scope",
          "next_action": "authenticate"
        }
      }
    }
  ]
}
```

### 404

```json
{
  "statusCode": "404",
  "description": "対象が見つかりません。",
  "headers": [
    {
      "name": "x-orchestor-request-id",
      "in": "header",
      "required": false,
      "description": "HTTP リクエストの相関 ID。ジョブの request_id とは別の値。",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "ratelimit-limit",
      "in": "header",
      "required": false,
      "description": "現在の期間で許可されるリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-remaining",
      "in": "header",
      "required": false,
      "description": "現在の期間で残っているリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-reset",
      "in": "header",
      "required": false,
      "description": "制限がリセットされるまでの秒数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "retry-after",
      "in": "header",
      "required": false,
      "description": "再試行までの待機秒数。",
      "schema": {
        "type": "integer"
      }
    }
  ],
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "name": "ErrorEnvelope",
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "description": "失敗理由と再試行に必要な情報。失敗していなければ null。",
            "required": [
              "code",
              "message",
              "request_id",
              "category",
              "stage",
              "retryable",
              "retry_after_seconds",
              "public_reason",
              "next_action"
            ],
            "properties": {
              "code": {
                "name": "CreativeErrorCode",
                "type": "string",
                "description": "失敗原因を識別する機械処理向けコード。message の文字列で分岐しないでください。",
                "enumValues": [
                  "bad_request",
                  "invalid_request",
                  "unknown_parameter",
                  "unauthorized",
                  "session_not_accepted",
                  "insufficient_funds",
                  "not_enough_credits",
                  "api_key_spend_limit_exceeded",
                  "insufficient_scope",
                  "open_key_route_not_allowed",
                  "open_key_required",
                  "not_found",
                  "project_not_found",
                  "canvas_template_not_found",
                  "canvas_share_not_found",
                  "canvas_share_passphrase_required",
                  "idempotency_conflict",
                  "draft_expired",
                  "job_not_completed",
                  "job_failed",
                  "job_canceled",
                  "job_generation_already_started",
                  "job_not_cancelable",
                  "webhook_not_configured",
                  "job_not_terminal",
                  "asset_upload_incomplete",
                  "top_up_in_dashboard",
                  "payload_too_large",
                  "asset_too_large",
                  "unsupported_media_type",
                  "queue_full",
                  "rate_limited",
                  "provider_rate_limited",
                  "internal_error",
                  "billing_in_dashboard",
                  "provider_submission_failed",
                  "provider_unavailable",
                  "content_moderated",
                  "input_rejected",
                  "provider_capacity_exceeded",
                  "provider_not_configured",
                  "database_busy",
                  "deploy_draining",
                  "overloaded",
                  "replica_not_ready",
                  "api_key_auth_unavailable",
                  "asset_storage_unavailable",
                  "video_analysis_failed"
                ]
              },
              "message": {
                "type": "string",
                "description": "利用者に表示できる処理結果または失敗理由の説明。"
              },
              "request_id": {
                "pattern": "^req_[a-f0-9]{32}$",
                "type": "string",
                "description": "この生成または HTTP 要求を追跡する ID。HTTP の相関 ID とジョブ ID は別に記録します。"
              },
              "category": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力、認証、課金、生成など、失敗原因の分類。"
              },
              "stage": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力検証、受付、生成、決済など、失敗が発生した段階。"
              },
              "retryable": {
                "type": "boolean",
                "description": "入力を変えずに後から再試行できるかどうか。"
              },
              "retry_after_seconds": {
                "type": "integer",
                "nullable": true,
                "description": "同じ要求を再試行するまで待つ秒数。再試行不要なら null。"
              },
              "public_reason": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "利用者に公開できる失敗理由の識別子。"
              },
              "next_action": {
                "type": "string",
                "description": "次に必要な操作。値に従って入力修正、待機、状態確認、結果取得などを行います。",
                "enumValues": [
                  "fix_input",
                  "authenticate",
                  "add_funds",
                  "retry_later",
                  "poll_status",
                  "inspect_events",
                  "contact_support"
                ]
              },
              "details": {
                "description": "失敗原因を調べるための補足情報。内容はエラーコードごとに異なります。"
              }
            }
          }
        }
      },
      "example": {
        "error": {
          "code": "not_found",
          "message": "対象が見つかりません。ルート、モデル、ジョブとワークスペースの所属を確認してください。",
          "request_id": "req_00000000000000000000000000000000",
          "category": "validation",
          "stage": "validation",
          "retryable": false,
          "retry_after_seconds": null,
          "public_reason": "not_found",
          "next_action": "fix_input"
        }
      }
    }
  ]
}
```

---

[Documentation index](https://orchestor.io/docs/llms.txt)
