{
 "openapi": "3.1.0",
 "info": {
  "title": "Gyro Public API",
  "version": "2.44.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/backup-spaces/{id}": {
   "get": {
    "tags": [
     "Backup space"
    ],
    "operationId": "getBackupSpace",
    "summary": "Get a backup space",
    "x-summary-tr": "Yedekleme alanı ayrıntısı",
    "x-scope": "services_read",
    "x-cli": {
     "command": "backup-space get",
     "confirm": false
    },
    "description": "Service row plus `backup_space`: SFTP host, port, user, writable path, size, usage, bound server, allowed IPs and state. The password is not included (see /credentials).",
    "x-description-tr": "Hizmet satırı ve `backup_space`: SFTP adresi, port, kullanıcı, yazılabilir dizin, boyut, kullanım, bağlı sunucu, izinli IP'ler ve durum. Parola yoktur (/credentials).",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      },
      "description": "Backup space (service) id",
      "x-description-tr": "Yedekleme alanı (hizmet) kimliği"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "object",
           "properties": {
            "id": {
             "type": "integer"
            },
            "name": {
             "type": "string"
            },
            "status": {
             "type": "string"
            },
            "backup_space": {
             "$ref": "#/components/schemas/BackupSpaceConnection"
            }
           }
          }
         }
        }
       }
      }
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  }
 },
 "components": {
  "responses": {
   "NotFound": {
    "description": "Not found — also returned for objects owned by someone else",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "Forbidden": {
    "description": "Key lacks the scope, IP not allowed, or feature disabled",
    "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."
       }
      }
     }
    }
   },
   "BackupSpaceConnection": {
    "type": "object",
    "description": "Connection and state of the space (no password: use /credentials).",
    "x-description-tr": "Alanın bağlantısı ve durumu (parola yok: /credentials).",
    "properties": {
     "host": {
      "type": "string",
      "example": "45.87.174.12",
      "description": "SFTP host (empty until the space is set up)"
     },
     "port": {
      "type": "integer",
      "example": 2201
     },
     "user": {
      "type": "string",
      "example": "y-m12345"
     },
     "path": {
      "type": "string",
      "example": "/veri",
      "description": "writable directory (the root is read-only)"
     },
     "protocol": {
      "type": "string",
      "const": "sftp"
     },
     "size_gb": {
      "type": "integer"
     },
     "size_plan": {
      "type": "string",
      "example": "100gb"
     },
     "used_bytes": {
      "type": [
       "integer",
       "null"
      ]
     },
     "used_percent": {
      "type": [
       "number",
       "null"
      ]
     },
     "server_id": {
      "type": [
       "integer",
       "null"
      ],
      "description": "bound server"
     },
     "allowed_ips": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "description": "IPv4 addresses of the bound server allowed to connect"
     },
     "state": {
      "type": "string",
      "enum": [
       "pending",
       "active",
       "noserver",
       "suspended",
       "cancelled",
       "purged"
      ],
      "description": "pending = being set up; noserver = no bound server (no one can connect); suspended = access locked, data kept; cancelled/purged = deleted"
     }
    }
   }
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ]
}