{
 "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/servers/{id}/ips/{ip}": {
   "delete": {
    "tags": [
     "Networking"
    ],
    "operationId": "removeServerIp",
    "summary": "Release an additional IPv4 address",
    "x-summary-tr": "Ek IPv4 adresini bırak",
    "x-scope": "cloud_write",
    "x-cli": {
     "command": "server ip remove",
     "confirm": true
    },
    "description": "**Minimum charge:** each added IP is billed for at least 6 hours (`pricing.minimum_hours`): releasing it earlier still bills the minimum (debited at release), and taking the same address again starts a new minimum. At most `adds_per_hour` addresses (default 10) can be added to a server per 60 minutes. The address is removed from the server and returns to the pool (getting the same address back is not guaranteed); billing stops at release (the minimum still applies). Needs `confirm=true`.",
    "x-description-tr": "**Asgari ücret:** her eklenen IP en az 6 saat ücretlendirilir (`pricing.minimum_hours`): daha erken bırakılsa da asgari süre (bırakırken) düşülür; aynı adresi yeniden almak yeni bir asgari süre başlatır. Bir sunucuya 60 dakikada en çok `adds_per_hour` (varsayılan 10) adres eklenebilir. Adres sunucudan kaldırılır ve havuza döner (aynı adresi geri alma garantisi yok); ücret bırakınca durur (asgari süre yine uygulanır). `confirm=true` gerekir.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      },
      "description": "Server id (tr-ist-1)"
     },
     {
      "name": "ip",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "confirm",
      "in": "query",
      "required": true,
      "schema": {
       "type": "boolean"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "$ref": "#/components/schemas/ServerIps"
          }
         }
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     },
     "409": {
      "description": "not_actionable (suspended / busy)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "$ref": "#/components/responses/Validation"
     },
     "501": {
      "description": "not_supported (not a tr-ist-1 Gyro Compute server)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "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."
       }
      }
     }
    }
   },
   "ServerIps": {
    "type": "object",
    "properties": {
     "server_id": {
      "type": "integer"
     },
     "primary_ip": {
      "type": [
       "string",
       "null"
      ]
     },
     "extra_ips": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "ip": {
         "type": "string"
        },
        "prefix": {
         "type": "integer",
         "description": "always 32 (configured as /32 on the primary interface)"
        },
        "added_at": {
         "type": [
          "string",
          "null"
         ]
        },
        "reverse_dns": {
         "type": [
          "string",
          "null"
         ]
        }
       }
      }
     },
     "count": {
      "type": "integer"
     },
     "max": {
      "type": "integer",
      "description": "per-server limit (default 5)"
     },
     "available": {
      "type": "integer"
     },
     "applied_on_server": {
      "type": "boolean",
      "description": "false = the server's guest agent did not confirm yet (see manual_commands)"
     },
     "pending": {
      "type": "boolean",
      "description": "true while the address list is being applied on the server (a few seconds)"
     },
     "manual_commands": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "pricing": {
      "type": "object",
      "properties": {
       "billing": {
        "type": "string"
       },
       "per_ip_monthly_eur": {
        "type": "number"
       },
       "per_ip_hourly_eur": {
        "type": "number"
       },
       "per_ip_monthly_text": {
        "type": [
         "string",
         "null"
        ],
        "description": "TL (EUR) at the panel rate"
       },
       "minimum_hours": {
        "type": "integer",
        "description": "every added address is billed at least this many hours (default 6), even if released earlier; taking an address again starts a new minimum"
       }
      }
     },
     "added": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "released": {
      "type": "string"
     },
     "adds_per_hour": {
      "type": [
       "integer",
       "null"
      ],
      "description": "addresses that can be added to this server per rolling 60 minutes (default 10)"
     },
     "adds_left_this_hour": {
      "type": [
       "integer",
       "null"
      ]
     }
    }
   }
  },
  "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"
      }
     }
    }
   }
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ]
}