{
    "openapi": "3.0.3",
    "info": {
        "title": "シンVPS API",
        "description": "シンVPS API は、シンVPS のVPSパネルで提供している基本操作（VPS情報の取得・電源操作・OS再インストール・パケットフィルター設定・新規お申し込み）を REST API で利用するためのインターフェースです。",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "https://api.shin-server.jp",
            "description": "シンクラウド"
        }
    ],
    "security": [
        {
            "BearerAuth": [

            ]
        }
    ],
    "paths": {
        "/v1/me": {
            "get": {
                "tags": [
                    "APIキー情報"
                ],
                "summary": "認証中のAPIキー情報を取得",
                "description": "現在認証に使用しているAPIキーの情報を返します。有効期限と、キーに設定された各サービスの権限・操作対象を確認できます。\n\nすべてのサービスで共通のエンドポイントです。APIキーの疎通確認や、鍵の有効期限が切れていないかの確認に利用できます。\n\n権限・操作対象の正本は services{} です。VPSのAPIキーでは services.vps に permission_type・target_mode・targets（対象VPSの uuid）・allow_signup が含まれます。 targets は target_mode=selected 時のみ値が入り、all 時は空配列です。",
                "x-scope": "読み取り",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "expires_at": {
                                            "type": "string",
                                            "nullable": true,
                                            "description": "有効期限（YYYY-MM-DD HH:MM:SS形式）。無期限の場合は null"
                                        },
                                        "services": {
                                            "type": "object",
                                            "description": "APIキーに設定されたサービスごとの権限・操作対象。キーは server / domain / wphosting / vps",
                                            "properties": {
                                                "{service}": {
                                                    "type": "object",
                                                    "properties": {
                                                        "permission_type": {
                                                            "type": "string",
                                                            "description": "権限種別（full / read / custom）"
                                                        },
                                                        "target_mode": {
                                                            "type": "string",
                                                            "description": "操作対象の範囲（all: すべて / selected: 指定のみ）"
                                                        },
                                                        "targets": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string"
                                                            },
                                                            "description": "target_mode=selected 時の操作対象一覧。vps では対象VPSの識別子（uuid）。all 時は空配列"
                                                        },
                                                        "permissions": {
                                                            "type": "object",
                                                            "description": "permission_type=custom 時のみ。カテゴリ名をキーとした権限マップ（full / read / none）"
                                                        }
                                                    }
                                                },
                                                "domain": {
                                                    "type": "object",
                                                    "properties": {
                                                        "allow_acquisition": {
                                                            "type": "boolean",
                                                            "description": "services.domain にのみ含まれる。ドメイン取得・移管・更新の許可"
                                                        }
                                                    }
                                                },
                                                "vps": {
                                                    "type": "object",
                                                    "properties": {
                                                        "allow_signup": {
                                                            "type": "boolean",
                                                            "description": "services.vps にのみ含まれる。VPSの新規お申し込みの許可"
                                                        }
                                                    }
                                                },
                                                "wphosting": {
                                                    "type": "object",
                                                    "properties": {
                                                        "site_target_mode": {
                                                            "type": "string",
                                                            "description": "services.wphosting にのみ含まれる。サイト操作対象（all / selected）"
                                                        },
                                                        "sites": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string"
                                                            },
                                                            "description": "services.wphosting にのみ含まれる。site_target_mode=selected 時のサイト servername 一覧"
                                                        }
                                                    }
                                                }
                                            }
                                        },
                                        "service_type": {
                                            "type": "string",
                                            "description": "【非推奨・後方互換】旧来型サーバー1台キーのみ含まれる。常に server"
                                        },
                                        "servername": {
                                            "type": "string",
                                            "description": "【非推奨・後方互換】旧来型サーバー1台キーのみ含まれる。services.server.targets[0] と同値"
                                        },
                                        "permission_type": {
                                            "type": "string",
                                            "description": "【非推奨・後方互換】旧来型サーバー1台キーのみ含まれる。services.server.permission_type と同値"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/vps/plans": {
            "get": {
                "tags": [
                    "新規お申し込み"
                ],
                "summary": "お申し込み可能なプラン・料金を取得",
                "description": "APIからお申し込み可能なプランと契約期間ごとの料金（税込）、お申し込みに指定できるOSイメージの一覧を返します。\n\nAPIキー設定でVPSの新規お申し込みが許可されていない場合は 403 FORBIDDEN になります。\n\n一時的に新規お申し込みの受付を停止しているプランも、再開予定の提供対象プランであれば一覧に含まれます。一覧にあっても、受付停止中・メンテナンス中は dry_run・実申請とも 409 CAPACITY_UNAVAILABLE になります。現在の受付可否は、新規お申し込みAPIを dry_run=true で実行して確認してください。完全に提供を終了したプランは一覧から除外されます。\n\ntotal_price は「その日にお申し込みした場合の初回のお支払い額」（当月の日割り分＋契約期間分・キャンペーン適用後）で、日によって変わります。新規お申し込みAPIの expected_total_price には、このAPIが返した対象プラン・契約期間の total_price を指定してください。",
                "x-scope": "読み取り",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "plans": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "plan_id": {
                                                        "type": "string",
                                                        "description": "プランID。プラン系統とメモリ容量をハイフンでつないだ形式（スタンダードは vps-2gb、大容量メモリは vps-highmem-4gb など）で、新規お申し込みAPIの plan_id に指定します"
                                                    },
                                                    "vps_type": {
                                                        "type": "string",
                                                        "description": "サービスタイプ。vps: シンVPS"
                                                    },
                                                    "plan_name": {
                                                        "type": "string",
                                                        "description": "プラン名"
                                                    },
                                                    "memory_mb": {
                                                        "type": "integer",
                                                        "description": "メモリ容量（MB）"
                                                    },
                                                    "vcpu": {
                                                        "type": "integer",
                                                        "description": "vCPUコア数"
                                                    },
                                                    "disk_gb": {
                                                        "type": "integer",
                                                        "description": "ディスク容量（GB）"
                                                    },
                                                    "currency": {
                                                        "type": "string",
                                                        "description": "通貨（JPY）"
                                                    },
                                                    "periods[]": {
                                                        "type": "object",
                                                        "properties": {
                                                            "months": {
                                                                "type": "integer",
                                                                "description": "契約期間（月数）"
                                                            },
                                                            "total_price": {
                                                                "type": "integer",
                                                                "description": "本日お申し込みした場合の合計金額（税込・円・キャンペーン適用後の実際のお支払い額）"
                                                            },
                                                            "regular_total_price": {
                                                                "type": "integer",
                                                                "description": "本日お申し込みした場合の通常価格（税込・円・キャンペーン適用前・日割り込み）。キャンペーン適用がない場合は total_price と同額"
                                                            },
                                                            "campaign_applied": {
                                                                "type": "boolean",
                                                                "description": "キャンペーン価格が適用されているか"
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        },
                                        "os_images": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "image_id": {
                                                        "type": "string",
                                                        "description": "OSイメージのID。新規お申し込みAPIの image_id に指定します"
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "description": "OS名"
                                                    },
                                                    "version": {
                                                        "type": "string",
                                                        "nullable": true,
                                                        "description": "バージョン表記"
                                                    },
                                                    "minimum_memory_mb": {
                                                        "type": "integer",
                                                        "description": "必要メモリ容量（MB）。この値以上の memory_mb を持つプランでのみ指定できます（0 は制限なし）"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "VPSの新規お申し込みが許可されていない（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/vps/servers": {
            "post": {
                "tags": [
                    "新規お申し込み"
                ],
                "summary": "VPSを新規お申し込み",
                "description": "VPSの新規契約をお申し込みます。料金はプリペイド（前払い残高）から引き落とされます。残高が不足している場合はエラー（PAYMENT_REQUIRED）になります。\n\nご利用には、APIキーの設定で「このキーでVPSの新規お申し込みを許可する」を有効にしておく必要があります。この設定を有効にするには、プリペイドに20,000円以上の残高が必要です。また、操作範囲が「指定のVPSのみ」のAPIキーからは利用できません（403 FORBIDDEN）。\n\nお申し込みできるのはシンVPS（スタンダード・大容量メモリ）です。無料プランには対応していません。\n\ndry_run が true の場合は、課金・契約作成を行わず、現在の受付可否を含む実行可否を検証します。お申し込み可能な場合は HTTP 200 で dry_run と total_price を返し、受け入れ可能なサーバーがない場合やメンテナンス中は 409 CAPACITY_UNAVAILABLE を返します。実申請には Idempotency-Key ヘッダーが必要です（UUID推奨）。\n\n実申請はリクエスト内でお支払い・契約作成・サーバーの作成まで同期的に処理され、成功すると HTTP 200 で server（お申し込みしたVPSの情報）を返します。status が active の場合はすぐに利用できます。OSの初期設定が続いている場合は building、サーバー作成が保留された場合は setup_pending で返ります。いずれの場合もお申し込み・お支払いは完了しており、通常は自動で完了します。その後の状況はお申し込み状況確認API（GET /v1/vps/signup-status/{id}）で確認できます。\n\n自動更新は既定で有効（プリペイドからの自動引き落とし）になります。1カ月契約では自動更新を無効にできず、auto_renew に false を指定すると VALIDATION_ERROR になります。3カ月以上の契約で無効にする場合は auto_renew に false を指定してください。自動更新にはプリペイド残高が必要です。更新時に残高が不足している場合は自動更新の設定が解除され、メールでお知らせします。\n\n新規アカウントの作成には対応していません（APIキーを発行したアカウントへの契約追加のみ）。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "実申請時に必須。8〜64文字の英数字・ハイフン・アンダースコア（UUID推奨）",
                        "schema": {
                            "type": "string",
                            "description": "実申請時に必須。8〜64文字の英数字・ハイフン・アンダースコア（UUID推奨）",
                            "example": "550e8400-e29b-41d4-a716-446655440000"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "plan_id": {
                                        "type": "string",
                                        "description": "プランID。プラン一覧APIの plans[].plan_id から指定します（vps-2gb、vps-highmem-4gb など）",
                                        "example": "vps-2gb"
                                    },
                                    "period": {
                                        "type": "integer",
                                        "description": "契約期間（月数）。プラン一覧APIが返した対象プランの periods[].months から指定します",
                                        "example": 12
                                    },
                                    "image_id": {
                                        "type": "string",
                                        "description": "OSイメージのID。プラン一覧APIの os_images[].image_id から指定します",
                                        "example": "vps_ubuntu2404"
                                    },
                                    "root_password": {
                                        "type": "string",
                                        "description": "rootパスワード（9〜70文字）。半角英字・半角数字・半角記号のうち2種類以上を使用してください。`（バッククォート）< > と全角文字は使用できません",
                                        "example": "MyPassw0rd-2026"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "サーバー名（最大50文字。半角英小文字・数字・-（ハイフン）・_（アンダースコア））。省略時は自動で設定されます"
                                    },
                                    "ssh_key_name": {
                                        "type": "string",
                                        "description": "作成されるサーバーに設定するSSHキーの名前。VPSパネルで登録済みのキーの名前を指定します。ssh_public_key と併せて指定した場合は、その名前で公開鍵を登録して使います。APIでは秘密鍵を応答しないためSSHキーの自動生成は行いません"
                                    },
                                    "ssh_public_key": {
                                        "type": "string",
                                        "description": "登録する公開鍵（OpenSSH形式・半角文字のみ）。ssh_key_name と併せて指定します。指定した名前で公開鍵を登録し、作成されるサーバーに設定します（OS再インストールAPIと同じ指定方法）"
                                    },
                                    "expected_total_price": {
                                        "type": "integer",
                                        "description": "合計金額（税込・円・キャンペーン適用後）。プラン一覧APIが返した対象プラン・契約期間の total_price を指定します。現在価格と一致しない場合はエラー（PRICE_MISMATCH）になります",
                                        "example": 19386
                                    },
                                    "agree_to_terms": {
                                        "type": "boolean",
                                        "description": "利用規約への同意（true 必須）",
                                        "example": true
                                    },
                                    "auto_renew": {
                                        "type": "boolean",
                                        "description": "自動更新の設定（省略時は true）。true でプリペイドからの自動引き落としによる自動更新が有効になります。1カ月契約では true 必須です"
                                    },
                                    "dry_run": {
                                        "type": "boolean",
                                        "description": "true の場合、課金・契約作成を行わずに実行可否のみ検証",
                                        "example": false
                                    }
                                },
                                "required": [
                                    "plan_id",
                                    "period",
                                    "image_id",
                                    "root_password",
                                    "expected_total_price",
                                    "agree_to_terms"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "課金・契約作成を行わずに実行可否を検証した結果",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "dry_run": {
                                            "type": "boolean",
                                            "description": "dry run であることを示す値（true）"
                                        },
                                        "total_price": {
                                            "type": "integer",
                                            "description": "実申請時の合計金額（税込・円・キャンペーン適用後）"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "受け入れ可能なサーバーがない・メンテナンス中（CAPACITY_UNAVAILABLE）・処理中の重複リクエスト（DUPLICATE_REQUEST）"
                    },
                    "422": {
                        "description": "価格不一致（PRICE_MISMATCH）・お申し込み対象外のプラン/期間（PLAN_NOT_AVAILABLE）・入力値/Idempotency-Key の検証エラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    },
                    "402": {
                        "description": "プリペイド残高不足（PAYMENT_REQUIRED）"
                    }
                }
            },
            "get": {
                "tags": [
                    "VPS情報"
                ],
                "summary": "VPS一覧を取得",
                "description": "ご契約中のVPSの一覧を返します。APIキーの対象が「指定のVPSのみ」の場合は、対象に設定されたVPSのみ返します。",
                "x-scope": "読み取り",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "servers": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "uuid": {
                                                        "type": "string",
                                                        "description": "VPSの識別子（uuid）。各APIのURLパスで使用します"
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "description": "VPSの名前（VPSパネルで設定した名前）"
                                                    },
                                                    "vps_type": {
                                                        "type": "string",
                                                        "description": "サービスタイプ。vps: シンVPS"
                                                    },
                                                    "plan_name": {
                                                        "type": "string",
                                                        "description": "プラン名"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "description": "契約状態。active: 利用中 / suspended: 凍結中"
                                                    },
                                                    "ip_address": {
                                                        "type": "string",
                                                        "nullable": true,
                                                        "description": "IPv4アドレス"
                                                    },
                                                    "os": {
                                                        "type": "string",
                                                        "nullable": true,
                                                        "description": "OS"
                                                    },
                                                    "memo": {
                                                        "type": "string",
                                                        "nullable": true,
                                                        "description": "メモ"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/vps/signup-status/{id}": {
            "get": {
                "tags": [
                    "新規お申し込み"
                ],
                "summary": "お申し込み状況を確認",
                "description": "お申し込み後のサーバー作成状況を返します。新規お申し込みAPIのレスポンスの status が building・setup_pending だった場合の確認先です。\n\nAPIキー設定でVPSの新規お申し込みが許可されていない場合は 403 FORBIDDEN になります。\n\nstatus が active になるとサーバーを利用できます。uuid が確定した後は、VPS詳細取得API（GET /v1/vps/servers/{uuid}）でも状態を確認できます。長時間 setup_pending のまま解消されない場合は、サポートまでお問い合わせください。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "新規お申し込みAPIのレスポンスで返された id（サービスコード）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "server": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "description": "VPSのサービスコード"
                                                },
                                                "uuid": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "VPSの識別子（uuid）。サーバーの作成が完了すると設定されます"
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "description": "サーバー名"
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "description": "VPSの状態。active: 利用可能 / building: OSの初期設定中 / setup_pending: サーバー作成の保留中"
                                                },
                                                "expiry_date": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "契約の有効期限（YYYY-MM-DD）。setup_pending の間は null"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "VPSの新規お申し込みが許可されていない（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/vps/servers/{uuid}": {
            "get": {
                "tags": [
                    "VPS情報"
                ],
                "summary": "VPS詳細を取得",
                "description": "指定したVPSの詳細（プラン・OS・IPアドレス・ホスト名・電源状態・メモ等）を返します。電源状態はリアルタイムの値を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "VPSの識別子（uuid）。VPS一覧API（GET /v1/vps/servers）のレスポンスで取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "server": {
                                            "type": "object",
                                            "properties": {
                                                "uuid": {
                                                    "type": "string",
                                                    "description": "VPSの識別子（uuid）"
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "description": "VPSの名前"
                                                },
                                                "vps_type": {
                                                    "type": "string",
                                                    "description": "サービスタイプ。vps: シンVPS"
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "description": "契約状態。active: 利用中 / suspended: 凍結中"
                                                },
                                                "plan": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "type": "string",
                                                            "description": "プラン名"
                                                        },
                                                        "vcpu": {
                                                            "type": "integer",
                                                            "description": "vCPUコア数"
                                                        },
                                                        "memory_gb": {
                                                            "type": "number",
                                                            "description": "メモリ容量（GB。メモリ増設適用後の値）"
                                                        },
                                                        "disk_gb": {
                                                            "type": "number",
                                                            "description": "ディスク容量（GB。増設ディスク適用後の値）"
                                                        }
                                                    }
                                                },
                                                "os": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "OS"
                                                },
                                                "application": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "インストール済みアプリケーションイメージ"
                                                },
                                                "hostname": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "標準ホスト名"
                                                },
                                                "reverse_hostname": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "逆引きホスト名"
                                                },
                                                "ip_address": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "IPv4アドレス"
                                                },
                                                "power": {
                                                    "type": "object",
                                                    "properties": {
                                                        "status": {
                                                            "type": "string",
                                                            "description": "電源状態。running: 稼働中 / stopped: 停止中 / processing: 電源操作などの反映中 / error: エラー"
                                                        }
                                                    }
                                                },
                                                "memo": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "メモ"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/vps/servers/{uuid}/memo": {
            "put": {
                "tags": [
                    "VPS情報"
                ],
                "summary": "メモを変更",
                "description": "VPSのメモを変更します。空文字を指定するとメモを削除します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "VPSの識別子（uuid）。VPS一覧API（GET /v1/vps/servers）のレスポンスで取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ（最大500文字）。空文字でメモを削除",
                                        "example": "本番環境（監視対象）"
                                    }
                                },
                                "required": [
                                    "memo"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果のメッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "電源状態や実行中の処理により操作を完了できなかった（OPERATION_ERROR）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/vps/servers/{uuid}/name": {
            "put": {
                "tags": [
                    "VPS情報"
                ],
                "summary": "サーバー名を変更",
                "description": "VPSの名前（サーバー名）を変更します。VPSパネルに表示される名前と共通です。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "VPSの識別子（uuid）。VPS一覧API（GET /v1/vps/servers）のレスポンスで取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "サーバー名（最大50文字。半角英小文字・数字・-（ハイフン）・_（アンダースコア）が使用できます）",
                                        "example": "web-server-01"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果のメッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "電源状態や実行中の処理により操作を完了できなかった（OPERATION_ERROR）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/vps/servers/{uuid}/reverse-dns": {
            "put": {
                "tags": [
                    "VPS情報"
                ],
                "summary": "逆引きホスト名を変更",
                "description": "VPSのIPアドレスの逆引きホスト名（PTRレコード）を変更します。標準ホスト名を指定すると初期設定に戻ります。指定したホスト名のドメイン所有確認や正引きとの一致確認は行いません。メールサーバー用途などで利用する場合は、正引き（Aレコード）がこのVPSのIPアドレスへ向いていることもあわせてご確認ください。現在の設定値はVPS詳細API（GET /v1/vps/servers/{uuid}）の reverse_hostname で確認できます。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "VPSの識別子（uuid）。VPS一覧API（GET /v1/vps/servers）のレスポンスで取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "hostname": {
                                        "type": "string",
                                        "description": "逆引きホスト名（最大253文字。半角英数字・-（ハイフン）・.（ドット）が使用できます）",
                                        "example": "mail.example.com"
                                    }
                                },
                                "required": [
                                    "hostname"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果のメッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "電源状態や実行中の処理により操作を完了できなかった（OPERATION_ERROR）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/vps/servers/{uuid}/power": {
            "get": {
                "tags": [
                    "電源操作"
                ],
                "summary": "電源状態を取得",
                "description": "VPSの現在の電源状態を返します。電源操作後の反映確認（ポーリング）にもこのAPIを使用します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "VPSの識別子（uuid）。VPS一覧API（GET /v1/vps/servers）のレスポンスで取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "power": {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "string",
                                                    "description": "電源状態。running: 稼働中 / stopped: 停止中 / processing: 電源操作などの反映中 / error: エラー"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/vps/servers/{uuid}/power/start": {
            "post": {
                "tags": [
                    "電源操作"
                ],
                "summary": "VPSを起動",
                "description": "停止中のVPSを起動します。受け付け後の反映は非同期で行われます（「電源操作の反映について」を参照）。稼働中など、現在の電源状態で実行できない場合は 409 が返されます。レスポンスボディはありません。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "VPSの識別子（uuid）。VPS一覧API（GET /v1/vps/servers）のレスポンスで取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted（電源操作を受け付けた）",
                        "headers": {
                            "Location": {
                                "description": "電源状態の確認先のパス（/v1/vps/servers/{uuid}/power）",
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "電源状態や実行中の処理により操作を完了できなかった（OPERATION_ERROR）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/vps/servers/{uuid}/power/reboot": {
            "post": {
                "tags": [
                    "電源操作"
                ],
                "summary": "VPSを再起動",
                "description": "VPSを再起動します。受け付け後の反映は非同期で行われます（「電源操作の反映について」を参照）。レスポンスボディはありません。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "VPSの識別子（uuid）。VPS一覧API（GET /v1/vps/servers）のレスポンスで取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "force": {
                                        "type": "boolean",
                                        "description": "true で強制再起動（電源断相当）。通常の再起動で応答がない場合に使用します（既定: false）",
                                        "example": false
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted（電源操作を受け付けた）",
                        "headers": {
                            "Location": {
                                "description": "電源状態の確認先のパス（/v1/vps/servers/{uuid}/power）",
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "電源状態や実行中の処理により操作を完了できなかった（OPERATION_ERROR）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/vps/servers/{uuid}/power/stop": {
            "post": {
                "tags": [
                    "電源操作"
                ],
                "summary": "VPSを停止",
                "description": "稼働中のVPSを停止します。受け付け後の反映は非同期で行われます（「電源操作の反映について」を参照）。OS上での正常なシャットダウンを行いたい場合は、OSにログインしてシャットダウンしてください。レスポンスボディはありません。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "VPSの識別子（uuid）。VPS一覧API（GET /v1/vps/servers）のレスポンスで取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted（電源操作を受け付けた）",
                        "headers": {
                            "Location": {
                                "description": "電源状態の確認先のパス（/v1/vps/servers/{uuid}/power）",
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "電源状態や実行中の処理により操作を完了できなかった（OPERATION_ERROR）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/vps/servers/{uuid}/packet-filter": {
            "get": {
                "tags": [
                    "パケットフィルター"
                ],
                "summary": "パケットフィルター設定を取得",
                "description": "パケットフィルター全体の有効/無効と、設定済みルールの一覧を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "VPSの識別子（uuid）。VPS一覧API（GET /v1/vps/servers）のレスポンスで取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "packet_filter": {
                                            "type": "object",
                                            "properties": {
                                                "enabled": {
                                                    "type": "boolean",
                                                    "description": "パケットフィルター全体の有効/無効"
                                                },
                                                "rules[]": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "description": "ルールのID"
                                                        },
                                                        "type": {
                                                            "type": "string",
                                                            "description": "ルール種別。ssh: SSH / web: Web（HTTP/HTTPS/FTP） / web_http: Web（HTTP/HTTPS） / mysql: MySQL / postgresql: PostgreSQL / mail: メール / rdp: リモートデスクトップ / custom: カスタム"
                                                        },
                                                        "protocol": {
                                                            "type": "string",
                                                            "nullable": true,
                                                            "description": "プロトコル（custom のみ）。tcp / udp / icmp"
                                                        },
                                                        "port": {
                                                            "type": "string",
                                                            "nullable": true,
                                                            "description": "ポート番号（custom のみ）。単一（例: 8080）または範囲（例: 8000-9000）。icmp は null"
                                                        },
                                                        "allowed_ip": {
                                                            "type": "string",
                                                            "description": "許可する接続元。all（すべて許可）またはIPアドレス/CIDR"
                                                        },
                                                        "memo": {
                                                            "type": "string",
                                                            "nullable": true,
                                                            "description": "メモ"
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "put": {
                "tags": [
                    "パケットフィルター"
                ],
                "summary": "パケットフィルターの有効/無効を切替",
                "description": "パケットフィルター全体の有効/無効を切り替えます。無効にすると、設定済みルールにかかわらずすべてのポートへの接続が許可されます。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "VPSの識別子（uuid）。VPS一覧API（GET /v1/vps/servers）のレスポンスで取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "enabled": {
                                        "type": "boolean",
                                        "description": "true で有効化 / false で無効化",
                                        "example": true
                                    }
                                },
                                "required": [
                                    "enabled"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果のメッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "電源状態や実行中の処理により操作を完了できなかった（OPERATION_ERROR）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/vps/servers/{uuid}/packet-filter/rules": {
            "post": {
                "tags": [
                    "パケットフィルター"
                ],
                "summary": "ルールを追加",
                "description": "パケットフィルターのルールを追加します。ルールは1台あたり最大20件で、同じ内容のルールは重複して追加できません（409 が返されます）。プリセット（custom 以外）は対象ポートが種別ごとに固定で、全てのIPアドレスからのアクセスを許可します（protocol / port / allowed_ip / memo は指定できず、指定した場合は 422 が返されます）。接続元IPアドレスを制限したい場合は type=custom で protocol / port / allowed_ip を指定してください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "VPSの識別子（uuid）。VPS一覧API（GET /v1/vps/servers）のレスポンスで取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "ルール種別。ssh / web / web_http / mysql / postgresql / mail / rdp / custom",
                                        "example": "custom"
                                    },
                                    "protocol": {
                                        "type": "string",
                                        "description": "プロトコル（custom の場合は必須）。tcp / udp / icmp",
                                        "example": "tcp"
                                    },
                                    "port": {
                                        "type": "string",
                                        "description": "ポート番号（custom の場合は必須。icmp を除く）。1〜65535の整数（例: 8080）または「最小値-最大値」の形式（例: 8000-9000）",
                                        "example": "8080"
                                    },
                                    "allowed_ip": {
                                        "type": "string",
                                        "description": "許可する接続元（custom のみ指定可）。all（すべて許可）またはIPアドレス/CIDR（既定: all）。プリセットでは指定できません（プリセットは常に全IPから許可）",
                                        "example": "203.0.113.0/24"
                                    },
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ（最大500文字。custom のみ）",
                                        "example": "監視エージェント"
                                    }
                                },
                                "required": [
                                    "type"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "rule": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "description": "追加したルールのID"
                                                },
                                                "type": {
                                                    "type": "string",
                                                    "description": "ルール種別"
                                                },
                                                "protocol": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "プロトコル"
                                                },
                                                "port": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "ポート番号"
                                                },
                                                "allowed_ip": {
                                                    "type": "string",
                                                    "description": "許可する接続元"
                                                },
                                                "memo": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "メモ"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "電源状態や実行中の処理により操作を完了できなかった（OPERATION_ERROR）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/vps/servers/{uuid}/packet-filter/rules/{rule_id}": {
            "put": {
                "tags": [
                    "パケットフィルター"
                ],
                "summary": "ルールを変更",
                "description": "カスタムルール（type=custom）の内容を変更します。protocol / port / allowed_ip / memo のうち1項目以上を指定してください。未指定の項目は現在値を維持します。プリセットのルールは変更できません（削除して追加し直してください）。protocol を icmp から tcp / udp に変更する場合は port も指定してください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "VPSの識別子（uuid）。VPS一覧API（GET /v1/vps/servers）のレスポンスで取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "rule_id",
                        "in": "path",
                        "required": true,
                        "description": "ルールのID。パケットフィルター設定の取得API（GET /v1/vps/servers/{uuid}/packet-filter）の rules[].id で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "protocol": {
                                        "type": "string",
                                        "description": "プロトコル。tcp / udp / icmp。省略時は現在値を維持",
                                        "example": "tcp"
                                    },
                                    "port": {
                                        "type": "string",
                                        "description": "ポート番号。1〜65535の整数（例: 8080）または「最小値-最大値」の形式（例: 8000-9000）。省略時は現在値を維持。icmp では使用せず、icmp から tcp / udp へ変更する場合は必須",
                                        "example": "8080"
                                    },
                                    "allowed_ip": {
                                        "type": "string",
                                        "description": "許可する接続元。all（すべて許可）またはIPアドレス/CIDR。省略時は現在値を維持",
                                        "example": "198.51.100.0/24"
                                    },
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ（最大500文字）。省略時は現在値を維持、空文字で削除",
                                        "example": "監視エージェント"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果のメッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "電源状態や実行中の処理により操作を完了できなかった（OPERATION_ERROR）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "delete": {
                "tags": [
                    "パケットフィルター"
                ],
                "summary": "ルールを削除",
                "description": "指定したパケットフィルターのルールを削除します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "VPSの識別子（uuid）。VPS一覧API（GET /v1/vps/servers）のレスポンスで取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "rule_id",
                        "in": "path",
                        "required": true,
                        "description": "ルールのID。パケットフィルター設定の取得API（GET /v1/vps/servers/{uuid}/packet-filter）の rules[].id で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "電源状態や実行中の処理により操作を完了できなかった（OPERATION_ERROR）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/vps/servers/{uuid}/os-images": {
            "get": {
                "tags": [
                    "OS再インストール"
                ],
                "summary": "再インストールできるイメージ一覧を取得",
                "description": "OS再インストールで指定できるイメージの一覧を返します。ご契約中のプランで選択できるイメージのみが返るため、VPSパネルのOS再インストール画面と同じ内容です。\n\navailable_for_this_server が false のイメージは、このVPSでは選択できません（理由は unavailable_reason を参照）。requires_basic_password が true のイメージは、OS再インストールAPIで basic_password の指定が必要です。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "VPSの識別子（uuid）。VPS一覧API（GET /v1/vps/servers）のレスポンスで取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "os_images": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "image_id": {
                                                        "type": "string",
                                                        "description": "イメージのID。OS再インストールAPIの image_id に指定します"
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "description": "イメージ名"
                                                    },
                                                    "version": {
                                                        "type": "string",
                                                        "nullable": true,
                                                        "description": "バージョン表記"
                                                    },
                                                    "type": {
                                                        "type": "string",
                                                        "description": "イメージの種類。os: OS / app: アプリケーション"
                                                    },
                                                    "category": {
                                                        "type": "string",
                                                        "nullable": true,
                                                        "description": "イメージのカテゴリ（同一OS・同一アプリのバージョン違いをまとめる区分）"
                                                    },
                                                    "minimum_memory_mb": {
                                                        "type": "integer",
                                                        "description": "必要メモリ容量（MB）。0 は制限なし"
                                                    },
                                                    "requires_basic_password": {
                                                        "type": "boolean",
                                                        "description": "true の場合、OS再インストールAPIで basic_password の指定が必要です（管理ツール付きイメージ）"
                                                    },
                                                    "available_for_this_server": {
                                                        "type": "boolean",
                                                        "description": "このVPSで選択できるか"
                                                    },
                                                    "unavailable_reason": {
                                                        "type": "string",
                                                        "nullable": true,
                                                        "description": "選択できない理由。image_memory_insufficient: プランのメモリ容量が不足 / license_required: 必要なライセンスが不足"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/vps/servers/{uuid}/os-reinstall": {
            "post": {
                "tags": [
                    "OS再インストール"
                ],
                "summary": "OSを再インストール",
                "description": "VPSのOSを再インストールします。指定したイメージでサーバーを作り直すため、サーバー内のデータ・設定はすべて削除されます。必要なデータは、あらかじめバックアップを取ったうえで実行してください。\n\n実行にはVPSを停止しておく必要があります。稼働中の場合は 409（INVALID_POWER_STATE）が返されます。停止はVPS停止API（POST /v1/vps/servers/{uuid}/power/stop）で行えます。\n\n誤操作を防ぐため、VPSごとに「操作保護」を設定できます。操作保護API（PUT /v1/vps/servers/{uuid}/protection）で os_reinstall を true にしたVPSに対しては 409（PROTECTED）が返され、再インストールは実行されません。あわせて、APIキーの権限を「カスタム」に設定すると「OS再インストール」だけを操作不可にできます。\n\n指定できるイメージ・パスワードの条件はご契約中のプランによって異なります（「OS再インストールについて」を参照）。指定できるイメージはイメージ一覧API（GET /v1/vps/servers/{uuid}/os-images）で取得できます。\n\n受け付け後の反映は非同期で行われます。レスポンスボディはありません。進捗はOS再インストール状況API（GET /v1/vps/servers/{uuid}/os-reinstall）で確認してください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "VPSの識別子（uuid）。VPS一覧API（GET /v1/vps/servers）のレスポンスで取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "image_id": {
                                        "type": "string",
                                        "description": "再インストールするイメージのID。イメージ一覧APIの os_images[].image_id から指定します",
                                        "example": "vps_ubuntu2404"
                                    },
                                    "root_password": {
                                        "type": "string",
                                        "description": "OSの管理者パスワード（9〜70文字）。root のパスワードになります。使用できる文字の条件は「OS再インストールについて」を参照",
                                        "example": "MyPassw0rd-2026"
                                    },
                                    "ssh_key_name": {
                                        "type": "string",
                                        "description": "再インストール後のサーバーに設定するSSHキーの名前。VPSパネルで登録済みのキーの名前を指定します。ssh_public_key と併せて指定した場合は、その名前で公開鍵を登録して使います。省略した場合はSSHキーを設定しません。APIでは秘密鍵を応答しないためSSHキーの自動生成は行いません"
                                    },
                                    "ssh_public_key": {
                                        "type": "string",
                                        "description": "登録する公開鍵（OpenSSH形式・半角文字のみ）。ssh_key_name と併せて指定します。指定した名前で公開鍵を登録し、再インストール後のサーバーに設定します（新規お申し込みAPIと同じ指定方法）"
                                    },
                                    "basic_password": {
                                        "type": "string",
                                        "description": "管理ツールのBasic認証パスワード（半角英数字12〜64文字）。イメージ一覧APIの requires_basic_password が true のイメージでは必須です。それ以外のイメージでは指定できません"
                                    }
                                },
                                "required": [
                                    "image_id",
                                    "root_password"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted（OS再インストールを受け付けた）",
                        "headers": {
                            "Location": {
                                "description": "OS再インストール状況の確認先のパス（/v1/vps/servers/{uuid}/os-reinstall）",
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "操作保護が有効（PROTECTED）・VPSが停止していない（INVALID_POWER_STATE）・プラン変更やイメージ保存などの処理が実行中（FEATURE_UNAVAILABLE）"
                    },
                    "422": {
                        "description": "このVPSでは選択できないイメージ（IMAGE_NOT_AVAILABLE）・プランのメモリ容量が不足（IMAGE_MEMORY_INSUFFICIENT）・必要なライセンスが不足（LICENSE_REQUIRED）・登録済みSSHキーが見つからない（SSH_KEY_NOT_FOUND）・SSHキーの登録に失敗（SSH_KEY_ERROR）・入力値の検証エラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "get": {
                "tags": [
                    "OS再インストール"
                ],
                "summary": "OS再インストールの状況を確認",
                "description": "OS再インストールの進行状況を返します。OS再インストールAPIを実行した後の確認先です（ポーリングの推奨間隔: 30秒程度）。\n\nstatus が completed になるとサーバーを利用できます。進捗率は返しません。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "VPSの識別子（uuid）。VPS一覧API（GET /v1/vps/servers）のレスポンスで取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "os_reinstall": {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "string",
                                                    "description": "再インストールの状況。rebuilding: サーバーの再構築中 / configuring: OSの初期設定中 / completed: 完了（利用可能） / error: エラー"
                                                },
                                                "image_id": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "現在インストールされているイメージのID"
                                                },
                                                "os": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "現在インストールされているOS名"
                                                },
                                                "installed_at": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "最後にOS再インストール（またはサーバー作成）を開始した日時（YYYY-MM-DD HH:MM:SS形式）"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/vps/servers/{uuid}/protection": {
            "get": {
                "tags": [
                    "OS再インストール"
                ],
                "summary": "操作保護の設定を取得",
                "description": "VPSごとの操作保護の設定を返します。操作保護は、APIからの破壊的な操作をVPS単位で拒否するための設定です（VPSパネルからの操作には影響しません）。\n\n現在は os_reinstall（OS再インストールの保護）のみです。有効なVPSに対してOS再インストールAPIを実行すると 409（PROTECTED）が返されます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "VPSの識別子（uuid）。VPS一覧API（GET /v1/vps/servers）のレスポンスで取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "protection": {
                                            "type": "object",
                                            "properties": {
                                                "os_reinstall": {
                                                    "type": "boolean",
                                                    "description": "OS再インストールの保護。true の場合、APIからのOS再インストールを拒否します（既定: false）"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "put": {
                "tags": [
                    "OS再インストール"
                ],
                "summary": "操作保護の設定を変更",
                "description": "VPSごとの操作保護の設定を変更します。指定した項目のみ更新します。\n\nos_reinstall を true にすると、そのVPSに対するOS再インストールAPIは 409（PROTECTED）で拒否されます。誤って再インストールしたくない本番サーバーや、自動化ツール・AIエージェントに操作させるVPSで有効にしておくことをおすすめします。再インストールする場合は、先に false へ戻してください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "VPSの識別子（uuid）。VPS一覧API（GET /v1/vps/servers）のレスポンスで取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "os_reinstall": {
                                        "type": "boolean",
                                        "description": "true で OS再インストールを保護（拒否）/ false で解除",
                                        "example": true
                                    }
                                },
                                "required": [
                                    "os_reinstall"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果のメッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "電源状態や実行中の処理により操作を完了できなかった（OPERATION_ERROR）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "BearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "APIキーを Bearer トークンとして送信"
            }
        }
    }
}