{
 "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/products": {
   "get": {
    "tags": [
     "Catalog"
    ],
    "operationId": "listProducts",
    "summary": "List orderable cloud server products",
    "x-summary-tr": "Sipariş verilebilen bulut sunucu ürünlerini listele",
    "description": "Prices are in the product currency, VAT excluded. `available=false` means temporarily out of stock.",
    "x-description-tr": "Fiyatlar ürün para biriminde ve KDV hariçtir. `available=false` geçici olarak stokta yok demektir.",
    "x-scope": "cloud_read",
    "parameters": [
     {
      "name": "region",
      "in": "query",
      "schema": {
       "type": "string",
       "example": "eu-de-1"
      },
      "description": "Filter by region (see GET /cloud/locations). A city name (falkenstein) also works."
     },
     {
      "name": "plan",
      "in": "query",
      "schema": {
       "type": "string",
       "example": "standart-2-4"
      },
      "description": "Filter by plan name"
     },
     {
      "name": "location",
      "in": "query",
      "deprecated": true,
      "schema": {
       "type": "string"
      },
      "description": "Deprecated alias of region (legacy location code)"
     },
     {
      "name": "server_type",
      "in": "query",
      "deprecated": true,
      "schema": {
       "type": "string"
      },
      "description": "Deprecated alias of plan (legacy type code)"
     },
     {
      "$ref": "#/components/parameters/Page"
     },
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 100,
       "default": 100
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Products",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/Product"
           }
          },
          "meta": {
           "$ref": "#/components/schemas/PageMeta"
          }
         }
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "422": {
      "$ref": "#/components/responses/Validation"
     }
    }
   }
  }
 },
 "components": {
  "responses": {
   "Validation": {
    "description": "Validation or business rule failure (`confirm_required`, `invalid_image`, `tool_action_failed` ...)",
    "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."
       }
      }
     }
    }
   },
   "PageMeta": {
    "type": "object",
    "properties": {
     "total": {
      "type": "integer"
     },
     "page": {
      "type": "integer"
     },
     "limit": {
      "type": "integer"
     },
     "next_page": {
      "type": "integer",
      "description": "0 when this is the last page"
     }
    }
   },
   "Product": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "example": 723
     },
     "name": {
      "type": "string",
      "example": "Gyro Bulut Standart 2-4"
     },
     "plan": {
      "type": "string",
      "example": "standart-2-4",
      "description": "Plan name (use it with region when ordering)"
     },
     "region": {
      "type": "string",
      "example": "eu-de-1",
      "description": "Gyro region"
     },
     "server_type": {
      "type": "string",
      "deprecated": true,
      "description": "Legacy type code (kept for backward compatibility; use plan)"
     },
     "location": {
      "type": "string",
      "deprecated": true,
      "description": "Legacy location code (kept for backward compatibility; use region)"
     },
     "cores": {
      "type": [
       "integer",
       "null"
      ]
     },
     "memory_gb": {
      "type": [
       "number",
       "null"
      ]
     },
     "disk_gb": {
      "type": [
       "integer",
       "null"
      ]
     },
     "cpu_type": {
      "type": [
       "string",
       "null"
      ],
      "enum": [
       "shared",
       "dedicated",
       null
      ]
     },
     "architecture": {
      "type": [
       "string",
       "null"
      ],
      "example": "x86"
     },
     "traffic_tb": {
      "type": [
       "number",
       "null"
      ]
     },
     "ipv4": {
      "type": "boolean"
     },
     "ipv6": {
      "type": "boolean"
     },
     "available": {
      "type": "boolean"
     },
     "prices": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Price"
      }
     },
     "product_line": {
      "type": "string",
      "enum": [
       "cloud_server",
       "vds"
      ],
      "description": "cloud_server (Gyro Cloud: global regions and tr-ist-1) or vds (Istanbul VDS line)"
     },
     "billing": {
      "type": "string",
      "enum": [
       "invoice",
       "prepaid"
      ],
      "description": "invoice = paid per billing cycle (invoice). prepaid = charged hourly from the account balance (no invoice); `prices` then holds one `hourly` entry with `monthly_cap` (at most this much per calendar month)."
     }
    }
   },
   "Price": {
    "type": "object",
    "properties": {
     "cycle": {
      "type": "string",
      "example": "monthly"
     },
     "amount": {
      "type": "number"
     },
     "setup": {
      "type": "number"
     },
     "currency": {
      "type": "string"
     },
     "monthly_cap": {
      "type": "number",
      "description": "prepaid only: most charged per calendar month (Europe/Istanbul)"
     },
     "billing": {
      "type": "string",
      "enum": [
       "prepaid"
      ],
      "description": "prepaid only"
     }
    }
   }
  },
  "parameters": {
   "Page": {
    "name": "page",
    "in": "query",
    "schema": {
     "type": "integer",
     "minimum": 1,
     "default": 1
    }
   }
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ]
}