{
 "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/vpcs/{vpc_id}/gateway": {
   "get": {
    "tags": [
     "Private networks"
    ],
    "operationId": "getVpcGateway",
    "summary": "Get the VPC gateway",
    "x-summary-tr": "VPC kapısını getir",
    "x-scope": "cloud_read",
    "x-cli": {
     "command": "vpc gateway get"
    },
    "description": "The gateway gives private-only servers internet access (NAT), port forwarding and the inter-subnet rule. While it is on it is billed hourly from the prepaid balance (`monthly_eur` / 672, at least 1 hour, never more than `monthly_eur` a month) and needs at least one prepaid tr-ist-1 server on the account (409 `no_billing_server`). Turning it off releases its public IP; refused while port forwards exist, or while private-only servers use it (409 `gateway_in_use`, repeat with `allow_no_egress: true`). Outgoing connections are logged as required by Turkish Law No. 5651 (2 years). ",
    "x-description-tr": "Kapı; public IP'si kapalı sunucuların internete çıkışını (NAT), port yönlendirmeyi ve subnetler arası kuralı sağlar. Açıkken ön ödemeli bakiyeden saatlik ücretlenir (`monthly_eur` / 672, en az 1 saat, ayda en çok `monthly_eur`) ve hesapta en az bir ön ödemeli tr-ist-1 sunucusu gerekir (409 `no_billing_server`). Kapatınca public IP bırakılır; port yönlendirme varken ya da public IP'si kapalı sunucular kullanırken reddedilir (409 `gateway_in_use`, `allow_no_egress: true` ile tekrarlayın). Dışarı çıkan bağlantılar 5651 sayılı Kanun gereği kaydedilir (2 yıl). ",
    "parameters": [
     {
      "name": "vpc_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "VPC id (from GET /cloud/vpcs)"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "$ref": "#/components/schemas/VpcGateway"
          }
         }
        }
       }
      }
     },
     "403": {
      "description": "not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     },
     "409": {
      "description": "conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "$ref": "#/components/responses/Validation"
     },
     "503": {
      "description": "capacity / pool_exhausted (try again later)",
      "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."
       }
      }
     }
    }
   },
   "VpcGateway": {
    "type": "object",
    "properties": {
     "enabled": {
      "type": "boolean"
     },
     "nat": {
      "type": "boolean",
      "description": "internet access for the VPC's servers"
     },
     "inter_subnet": {
      "type": "string",
      "enum": [
       "allow",
       "deny"
      ],
      "description": "traffic between the VPC's subnets"
     },
     "public_ip": {
      "type": "string",
      "description": "gateway IPv4 (empty while off)"
     },
     "status": {
      "type": "string",
      "enum": [
       "off",
       "active",
       "syncing"
      ]
     },
     "port_forwards": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/VpcPortForward"
      }
     },
     "monthly_eur": {
      "type": "number",
      "description": "price while on, per month (cap)"
     },
     "hourly_eur": {
      "type": "number"
     }
    }
   },
   "VpcPortForward": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "protocol": {
      "type": "string",
      "enum": [
       "tcp",
       "udp"
      ]
     },
     "public_port": {
      "type": "integer"
     },
     "target_ip": {
      "type": "string"
     },
     "target_port": {
      "type": "integer"
     },
     "created_at": {
      "type": "string",
      "format": "date-time"
     }
    }
   }
  },
  "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": []
  }
 ]
}