{
 "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/templates/{id}": {
   "patch": {
    "tags": [
     "Templates"
    ],
    "operationId": "updateTemplate",
    "summary": "Rename a template",
    "x-summary-tr": "Şablonu yeniden adlandır",
    "x-scope": "cloud_write",
    "x-cli": {
     "command": "template update"
    },
    "description": "Name 1-60 characters (letters, digits, space . _ -).",
    "x-description-tr": "Ad 1-60 karakter (harf, rakam, boşluk . _ -).",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      },
      "description": "Template id"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "$ref": "#/components/schemas/Template"
          }
         }
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     },
     "409": {
      "description": "template_limit, template_not_ready, busy",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "$ref": "#/components/responses/Validation"
     }
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "maxLength": 60
         },
         "description": {
          "type": "string",
          "maxLength": 200
         }
        },
        "required": []
       }
      }
     }
    }
   }
  }
 },
 "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"
      }
     }
    }
   }
  },
  "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."
       }
      }
     }
    }
   },
   "Template": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer"
     },
     "image": {
      "type": "string",
      "description": "Image slug to use for installs: custom:<id>"
     },
     "name": {
      "type": "string"
     },
     "description": {
      "type": "string"
     },
     "status": {
      "type": "string",
      "enum": [
       "creating",
       "ready",
       "error",
       "deleting",
       "suspended"
      ],
      "description": "suspended = template storage suspended (balance)"
     },
     "size_gb": {
      "type": "number",
      "description": "Space the template really uses (GB, billed)"
     },
     "size_bytes": {
      "type": "integer"
     },
     "min_disk_gb": {
      "type": "integer",
      "description": "Smallest disk a server from this template can have"
     },
     "base_image": {
      "type": "string"
     },
     "base_image_name": {
      "type": "string"
     },
     "source_server_id": {
      "type": [
       "integer",
       "null"
      ]
     },
     "region": {
      "type": "string"
     },
     "mode": {
      "type": "string",
      "enum": [
       "snapshot",
       "shutdown"
      ],
      "description": "How the template was copied"
     },
     "warnings": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "description": "crash_consistent | extra_disks_excluded"
     },
     "created_at": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "ready_at": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "pricing": {
      "type": "object",
      "properties": {
       "billing": {
        "type": "string"
       },
       "per_gb_monthly_eur": {
        "type": "number"
       },
       "monthly_eur": {
        "type": "number"
       },
       "hourly_eur": {
        "type": "number"
       }
      }
     }
    }
   }
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ]
}