{
 "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/containers/{id}/nodes": {
   "put": {
    "tags": [
     "Containers"
    ],
    "operationId": "setContainerNodes",
    "summary": "Set the extra node count",
    "x-summary-tr": "Ek düğüm sayısını ayarla",
    "x-scope": "services_write",
    "description": "Adds or removes extra nodes of the plan's node size (absolute `extra_nodes`, 0 = plan only; at most 20 nodes per environment in total, GyroKota may lower it). An extra node costs the same as a plan node, billed hourly from the prepaid balance. Removing drains first: replicas move to the remaining nodes (services restart one by one, health checked), then the node is deleted; it is not billed while drained. Refused with 409 `quota_in_use` when the remaining nodes cannot hold the running services. Serverless environments have no nodes. Needs `\"confirm\": true`. Every change of a dedicated environment's node set (plan change, extra node added or removed) is announced BEFORE the old nodes go: as soon as the new nodes' addresses are known (usually under a minute) the owner is notified (Alerts channels, event `egress`) and `egress_change` / `pending_egress_ips` show them. With the approval step on (`PUT /cloud/containers/{id}/egress-approval`, 1-72 hours, 24 recommended) the new nodes take no traffic and the old nodes keep serving until `POST /cloud/containers/{id}/egress-change/approve` or the deadline (then it continues by itself). A removal only never waits.",
    "x-description-tr": "Paketin düğüm boyutunda ek düğüm ekler ya da çıkarır (mutlak `extra_nodes`, 0 = yalnız paket; ortam başına toplam en çok 20 düğüm, GyroKota düşürebilir). Ek düğüm paketteki düğümle aynı fiyattır, ön ödemeli bakiyeden saatlik düşer. Çıkarma önce boşaltır: kopyalar kalan düğümlere taşınır (servisler sırayla, sağlık kontrollü yeniden başlar), sonra düğüm silinir; boşaltılırken ücretlenmez. Kalan düğümler çalışan servislere yetmiyorsa 409 `quota_in_use`. Sunucusuz ortamlarda düğüm yoktur. `\"confirm\": true` gerekir. Ayrılmış ortamın düğüm takımı her değiştiğinde (paket değişikliği, ek düğüm ekleme / çıkarma) değişiklik eski düğümler kapanmadan ÖNCE duyurulur: yeni düğümlerin adresleri belli olur olmaz (genellikle bir dakikadan kısa) ortam sahibine bildirim gider (Uyarılar kanalları, `egress` olayı), `egress_change` / `pending_egress_ips` alanlarında görünür. Onay adımı açıksa (`PUT /cloud/containers/{id}/egress-approval`, 1-72 saat, önerilen 24) yeni düğümler trafik almaz, eski düğümler çalışmaya devam eder; `POST /cloud/containers/{id}/egress-change/approve` ya da süre dolunca geçiş devam eder. Yalnız düğüm çıkarma onay beklemez.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      },
      "description": "Service id"
     }
    ],
    "responses": {
     "202": {
      "description": "Tool data / result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "object",
           "additionalProperties": true
          }
         }
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     },
     "409": {
      "$ref": "#/components/responses/Conflict"
     },
     "422": {
      "$ref": "#/components/responses/Validation"
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "extra_nodes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 19,
          "example": 1
         },
         "confirm": {
          "type": "boolean"
         }
        },
        "required": [
         "extra_nodes"
        ]
       }
      }
     }
    },
    "x-cli": {
     "command": "container nodes set",
     "confirm": true,
     "money": true
    }
   }
  }
 },
 "components": {
  "responses": {
   "Validation": {
    "description": "Validation or business rule failure (`confirm_required`, `invalid_image`, `tool_action_failed` ...)",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "Conflict": {
    "description": "State conflict (`server_locked`, `not_actionable`, `ssh_key_exists`, `server_limit`, `idempotency_in_flight`)",
    "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"
      }
     }
    }
   }
  },
  "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": []
  }
 ]
}