{
 "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}/metrics": {
   "get": {
    "tags": [
     "Monitoring"
    ],
    "operationId": "getMetrics",
    "summary": "CPU, disk and network time series",
    "x-summary-tr": "CPU, disk ve ağ zaman serileri",
    "x-scope": "cloud_read",
    "parameters": [
     {
      "name": "period",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "24h",
        "7d",
        "30d"
       ],
       "default": "24h"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Metrics; each line is a list of [unix_time, value]",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "$ref": "#/components/schemas/Metrics"
          }
         }
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    },
    "description": "tr-ist-1 (Gyro Compute): instant values (one point per series: cpu %, memory active/total MB, uptime s) and `instant: true`."
   },
   "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": {
   "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."
       }
      }
     }
    }
   },
   "Metrics": {
    "type": "object",
    "properties": {
     "period": {
      "type": "string"
     },
     "series": {
      "type": "object",
      "additionalProperties": {
       "type": "object",
       "properties": {
        "unit": {
         "type": "string"
        },
        "lines": {
         "type": "object",
         "additionalProperties": {
          "type": "array",
          "items": {
           "type": "array",
           "prefixItems": [
            {
             "type": "integer"
            },
            {
             "type": "number"
            }
           ],
           "minItems": 2,
           "maxItems": 2
          }
         }
        }
       }
      }
     }
    }
   }
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ]
}