{
 "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}/rdns": {
   "put": {
    "tags": [
     "Networking"
    ],
    "operationId": "setRdns",
    "summary": "Set (or reset) the PTR record of one address",
    "x-summary-tr": "Bir adresin PTR kaydını ayarla (veya sıfırla)",
    "x-scope": "cloud_write",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "ip"
        ],
        "properties": {
         "ip": {
          "type": "string",
          "description": "An address of this server (IPv6 addresses inside the server's /64 are allowed)"
         },
         "hostname": {
          "type": "string",
          "description": "FQDN; empty string resets to the default"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Updated list",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/RdnsEntry"
           }
          }
         }
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     },
     "422": {
      "$ref": "#/components/responses/Validation"
     }
    },
    "description": "**tr-ist-1 (Gyro Bulut İstanbul):** every address (primary and additional IPv4) gets an automatic PTR `<a-b-c-d>.ip.gyrohosting.com` with a matching A record. Set `hostname` to your own FQDN to replace it (published within seconds); an empty value restores the default. Names under Gyro domains and protected brand names are refused (HTTP 422 with an explanatory message); at most 30 changes per server per hour. The A record of your name should point to the address (forward-confirmed reverse DNS) for e-mail delivery; it is not enforced. When the server is deleted or an additional IP is released, its PTR is removed. `dns_ptr` and `ptr` are accepted as aliases of `hostname`. Legacy Istanbul VDS servers keep the request flow (`status: pending` until applied).",
    "x-description-tr": "**tr-ist-1 (Gyro Bulut İstanbul):** her adres (birincil ve ek IPv4) için otomatik PTR `<a-b-c-d>.ip.gyrohosting.com` ve eşleşen A kaydı vardır. `hostname` ile kendi tam alan adınızı yazın (saniyeler içinde yayında); boş değer varsayılana döndürür. Gyro alan adları altı ve korunan marka adları reddedilir (HTTP 422, açıklayıcı mesaj); sunucu başına saatte en çok 30 değişiklik. E-posta teslimi için adınızın A kaydı bu adresi göstermeli (zorunlu değil). Sunucu silinince ya da ek IP bırakılınca PTR kaldırılır. "
   },
   "parameters": [
    {
     "$ref": "#/components/parameters/ServerId"
    }
   ]
  }
 },
 "components": {
  "parameters": {
   "ServerId": {
    "name": "id",
    "in": "path",
    "required": true,
    "schema": {
     "type": "integer"
    },
    "description": "Server id (= service id in the client area)"
   }
  },
  "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."
       }
      }
     }
    }
   },
   "RdnsEntry": {
    "type": "object",
    "properties": {
     "ip": {
      "type": "string"
     },
     "hostname": {
      "type": [
       "string",
       "null"
      ]
     },
     "version": {
      "type": "string",
      "enum": [
       "ipv4",
       "ipv6"
      ]
     },
     "status": {
      "type": "string",
      "enum": [
       "none",
       "pending",
       "active",
       "rejected"
      ],
      "description": "tr-ist-1: `active` = published on our name servers (Gyro Bulut İstanbul publishes within seconds); `pending` only on legacy VDS servers"
     },
     "default": {
      "type": "boolean",
      "description": "tr-ist-1: true when the address uses the automatic default name `<a-b-c-d>.ip.gyrohosting.com` (forward A record exists, FCrDNS passes)"
     }
    }
   }
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ]
}