{
 "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/account/limits": {
   "get": {
    "tags": [
     "Account limits"
    ],
    "operationId": "getAccountLimits",
    "summary": "Account limits and usage",
    "x-summary-tr": "Hesap sınırları ve kullanım",
    "x-scope": "cloud_read",
    "x-cli": {
     "command": "limits"
    },
    "description": "Every limit that applies to your account with the current usage: the new-account limit of the prepaid cloud (first 7 days: 5 Gyro Cloud Istanbul servers and 1 container environment), Gyro Cloud Istanbul servers, templates, additional IPv4 / disks per server, API order caps (servers, batch size, paid operations per day), API keys, SSH keys, webhooks, firewall rules and security groups, storage buckets and keys, DNS zones, container plan limits, Gyro Pipeline, uptime monitors and projects. **Limits are raised on request: open a support ticket** (`POST /api/v1/client/tickets` with `department_id` 3, or `gyro ticket create`); `how_to_increase.support_ticket` is a ready request. Plan limits also grow with a bigger plan or an add-on. Answers are cached for 60 seconds (`fresh=1` reads again). Every refusal caused by a limit carries the same hint in `error.details` (schema LimitHint).",
    "x-description-tr": "Hesabınıza uygulanan tüm sınırlar ve şu anki kullanım: ön ödemeli bulutta yeni hesap sınırı (ilk 7 gün: 5 Gyro Bulut İstanbul sunucusu ve 1 kapsayıcı ortamı), Gyro Bulut İstanbul sunucuları, şablonlar, sunucu başına ek IPv4 / disk, API sipariş sınırları (sunucu, toplu adet, günlük ücretli işlem), API anahtarları, SSH anahtarları, webhook'lar, güvenlik duvarı kuralları ve güvenlik grupları, depolama kovaları ve anahtarları, DNS zone'ları, kapsayıcı paket sınırları, Gyro Pipeline, uptime izleyicileri ve projeler. **Sınırlar talep üzerine artırılır: destek talebi açın** (`POST /api/v1/client/tickets`, `department_id` 3 ya da `gyro ticket create`); `how_to_increase.support_ticket` hazır istektir. Paket sınırları paketi yükselterek ya da ek hizmetle de büyür. Yanıt 60 sn önbelleklidir (`fresh=1` yeniden okur). Sınır kaynaklı her ret `error.details` içinde aynı ipucunu taşır (LimitHint).",
    "parameters": [
     {
      "name": "fresh",
      "in": "query",
      "schema": {
       "type": "boolean"
      },
      "description": "bypass the 60 second cache"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "object",
           "properties": {
            "account_id": {
             "type": "integer"
            },
            "how_to_increase": {
             "type": "object",
             "properties": {
              "summary": {
               "type": "string"
              },
              "summary_tr": {
               "type": "string"
              },
              "support_ticket": {
               "type": "object"
              }
             }
            },
            "new_account": {
             "type": [
              "object",
              "null"
             ],
             "description": "prepaid cloud new-account limit (null = not offered)",
             "properties": {
              "applies": {
               "type": "boolean",
               "description": "true while the account is in its first period_days days"
              },
              "unlimited": {
               "type": "boolean"
              },
              "custom": {
               "type": "boolean"
              },
              "period_days": {
               "type": "integer",
               "example": 7
              },
              "account_age_days": {
               "type": [
                "number",
                "null"
               ]
              },
              "ends_at": {
               "type": [
                "string",
                "null"
               ],
               "description": "Europe/Istanbul"
              },
              "servers": {
               "type": "object",
               "properties": {
                "limit": {
                 "type": "integer",
                 "example": 5
                },
                "used": {
                 "type": "integer"
                }
               }
              },
              "container_environments": {
               "type": "object",
               "properties": {
                "limit": {
                 "type": "integer",
                 "example": 1
                },
                "used": {
                 "type": "integer"
                }
               }
              }
             }
            },
            "limits": {
             "type": "array",
             "items": {
              "$ref": "#/components/schemas/AccountLimit"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  }
 },
 "components": {
  "responses": {
   "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."
       }
      }
     }
    }
   },
   "AccountLimit": {
    "type": "object",
    "properties": {
     "key": {
      "type": "string",
      "example": "compute.max_vms"
     },
     "group": {
      "type": "string",
      "example": "compute"
     },
     "scope": {
      "type": "string",
      "enum": [
       "account",
       "service"
      ],
      "description": "account = one number for the account; service = applies to each service (see `services`)"
     },
     "limit": {
      "type": [
       "integer",
       "null"
      ],
      "description": "effective limit (null = depends on the plan of each service, see `services`, or no limit)"
     },
     "used": {
      "type": [
       "integer",
       "null"
      ]
     },
     "unit": {
      "type": "string"
     },
     "custom": {
      "type": "boolean",
      "description": "raised (or lowered) for your account"
     },
     "increasable": {
      "type": "boolean"
     },
     "how_to_increase": {
      "type": "string",
      "enum": [
       "open_support_ticket",
       "upgrade_plan_or_open_support_ticket",
       "upgrade_plan",
       "wait",
       "fixed"
      ]
     },
     "description": {
      "type": "string"
     },
     "description_tr": {
      "type": "string"
     },
     "max_size": {
      "type": "object",
      "description": "compute.max_server_size only",
      "properties": {
       "vcpu": {
        "type": "integer"
       },
       "memory_gb": {
        "type": "integer"
       },
       "disk_gb": {
        "type": "integer"
       }
      }
     },
     "services": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "service_id": {
         "type": "integer"
        },
        "name": {
         "type": "string"
        },
        "limit": {
         "type": [
          "integer",
          "null"
         ]
        },
        "used": {
         "type": [
          "integer",
          "null"
         ]
        }
       }
      }
     }
    }
   }
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ]
}