{
 "openapi": "3.1.0",
 "info": {
  "title": "Gyro Public API",
  "version": "2.30.0",
  "summary": "Manage Gyro cloud servers, SSH keys and billing programmatically.",
  "x-summary-tr": "Gyro bulut sunucularınızı, SSH anahtarlarınızı ve faturalarınızı programla yönetin.",
  "contact": {
   "name": "Gyro Hosting",
   "url": "https://www.gyrohosting.com"
  },
  "license": {
   "name": "Proprietary",
   "identifier": "LicenseRef-Gyro-API-Terms"
  }
 },
 "servers": [
  {
   "url": "https://www.gyrohosting.com/api/v1/client",
   "description": "Production"
  }
 ],
 "paths": {
  "/cloud/services/{id}/resize-options": {
   "get": {
    "tags": [
     "Plan changes and add-ons"
    ],
    "operationId": "getResizeOptions",
    "summary": "Products this service can be upgraded to, with prices",
    "x-summary-tr": "Hizmetin yükseltilebileceği ürünler ve fiyatları",
    "x-scope": "services_read",
    "responses": {
     "200": {
      "description": "Options",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "object",
           "additionalProperties": true
          }
         }
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     },
     "422": {
      "$ref": "#/components/responses/Validation"
     }
    },
    "description": "Prepaid services answer `billing: prepaid`; each option has `plan`, `current` and one `hourly` price with `monthly_cap`.\n\n**Data safety (Gyro Cloud Istanbul, tr-ist-1)**: a plan change keeps the disk and all its data, the IP addresses, additional disks and snapshots. The root disk is enlarged in place and the file system is extended automatically; a disk never shrinks, so a plan with a smaller disk is refused with 409 `disk_shrink` (also in `dry_run`; resize-options marks such plans `allowed: false`). Bigger CPU/RAM is applied live when the hypervisor allows it, otherwise the server is shut down cleanly and started again (measured: 1-2 -> 2-4 restarted, about 12 seconds without SSH; 2-4 -> 4-8 live, no restart). While the server has snapshots the disk cannot grow: 409 `resize_refused` (delete the snapshots first). The answer carries `data_preserved: true`, `disk: grows_only`, `restart: if_needed`. Only a rebuild (`POST /cloud/servers/{id}/actions/rebuild`, needs `confirm: true`) erases data: the disk, additional disks and snapshots are deleted (IP addresses stay). **`recreate_required`** (422, invoiced products only): the target plan would need the service to be re-created on another platform, which deletes its data; the API never does that and nothing is changed or charged. Pick another plan from resize-options, or create a new server, move the data and delete the old one.",
    "x-description-tr": "\n\n**Veri güvencesi (Gyro Bulut İstanbul, tr-ist-1)**: plan değişikliği diski ve içindeki tüm veriyi, IP adreslerini, ek diskleri ve snapshot'ları korur. Kök disk yerinde büyütülür ve dosya sistemi kendiliğinden genişler; disk asla küçülmez, daha küçük diskli plan 409 `disk_shrink` ile reddedilir (`dry_run`'da da; resize-options bu planları `allowed: false` gösterir). Artan CPU/RAM hipervizör izin veriyorsa canlı uygulanır, yoksa sunucu düzgünce kapatılıp yeniden açılır (ölçüm: 1-2 -> 2-4 yeniden başladı, SSH yaklaşık 12 sn yok; 2-4 -> 4-8 canlı, yeniden başlatma yok). Sunucuda snapshot varken disk büyütülemez: 409 `resize_refused` (önce snapshot'ları silin). Yanıtta `data_preserved: true`, `disk: grows_only`, `restart: if_needed`. Veriyi yalnız yeniden kurulum siler (`POST /cloud/servers/{id}/actions/rebuild`, `confirm: true` ister): disk, ek diskler ve snapshot'lar silinir (IP adresleri kalır). **`recreate_required`** (422, yalnız faturalı ürünler): hedef plan hizmetin başka platformda yeniden kurulmasını gerektirir, bu da veriyi siler; API bunu asla yapmaz, hiçbir şey değişmez ve ücret alınmaz. resize-options'tan başka plan seçin ya da yeni sunucu açıp veriyi taşıyın."
   },
   "parameters": [
    {
     "name": "id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "integer"
     }
    }
   ]
  }
 },
 "components": {
  "responses": {
   "Validation": {
    "description": "Validation or business rule failure (`confirm_required`, `invalid_image`, `tool_action_failed` ...)",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "NotFound": {
    "description": "Not found — also returned for objects owned by someone else",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "Unauthorized": {
    "description": "Missing, invalid or revoked key",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   }
  },
  "schemas": {
   "Error": {
    "type": "object",
    "required": [
     "error"
    ],
    "properties": {
     "error": {
      "type": "object",
      "required": [
       "code",
       "message"
      ],
      "properties": {
       "code": {
        "type": "string",
        "example": "server_not_found"
       },
       "message": {
        "type": "string"
       },
       "details": {
        "type": "object",
        "additionalProperties": true,
        "description": "Extra data. Limit refusals add the LimitHint fields (`limit_exceeded: true`, `limit_key`, `limit`, `current`, `how_to_increase`, `support_ticket`, `hint`): account limits are raised with a support ticket. Validation errors (length, format) never carry the limit hint.",
        "x-description-tr": "Ek veri. Sınır retlerinde LimitHint alanları gelir: hesap sınırları destek talebiyle artırılır. Doğrulama hataları (uzunluk, biçim) sınır ipucu taşımaz."
       }
      }
     }
    }
   }
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ]
}