{
 "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/services/{id}": {
   "get": {
    "tags": [
     "Services (all products)"
    ],
    "operationId": "getService",
    "summary": "Get a service (renewal, cancellation, access details)",
    "x-summary-tr": "Hizmeti getir (yenileme, iptal, erişim bilgileri)",
    "x-scope": "services_read",
    "responses": {
     "200": {
      "description": "Service",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "$ref": "#/components/schemas/Service"
          }
         }
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "parameters": [
    {
     "name": "id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "integer"
     }
    }
   ]
  }
 },
 "components": {
  "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."
       }
      }
     }
    }
   },
   "Service": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer"
     },
     "type": {
      "type": "string",
      "example": "server"
     },
     "product_line": {
      "type": "string",
      "example": "mail"
     },
     "module": {
      "type": [
       "string",
       "null"
      ],
      "description": "Omitted for white-label resellers"
     },
     "name": {
      "type": "string"
     },
     "status": {
      "type": "string"
     },
     "product_id": {
      "type": "integer"
     },
     "host": {
      "type": [
       "string",
       "null"
      ]
     },
     "ip": {
      "type": [
       "string",
       "null"
      ]
     },
     "cycle": {
      "type": "string"
     },
     "price": {
      "$ref": "#/components/schemas/Money"
     },
     "auto_renew": {
      "type": "boolean"
     },
     "due_date": {
      "type": [
       "string",
       "null"
      ],
      "format": "date"
     },
     "customer_id": {
      "type": [
       "integer",
       "null"
      ],
      "description": "Reseller end-customer the service is assigned to"
     },
     "nickname": {
      "type": [
       "string",
       "null"
      ],
      "description": "Customer-defined nickname (see `/cloud/services/{id}/label`); null when not set"
     },
     "tags": {
      "type": "array",
      "description": "Customer-defined colour tags (see `/cloud/services/{id}/label`); empty when not set",
      "items": {
       "$ref": "#/components/schemas/ServiceLabelTag"
      }
     },
     "project": {
      "$ref": "#/components/schemas/ProjectRef"
     }
    }
   },
   "ProjectRef": {
    "type": [
     "object",
     "null"
    ],
    "properties": {
     "id": {
      "type": "integer"
     },
     "name": {
      "type": "string"
     }
    },
    "description": "Project of the service (id 0 = default project); null when projects are not available"
   },
   "ServiceLabelTag": {
    "type": "object",
    "required": [
     "name"
    ],
    "properties": {
     "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 24,
      "description": "Letter or digit first; then letters, digits, space and . _ - / + # &",
      "example": "production"
     },
     "color": {
      "type": "string",
      "enum": [
       "gray",
       "blue",
       "green",
       "red",
       "orange",
       "yellow",
       "purple",
       "pink",
       "teal",
       "indigo"
      ],
      "example": "green"
     }
    }
   },
   "Money": {
    "type": "object",
    "properties": {
     "amount": {
      "type": "number"
     },
     "currency": {
      "type": [
       "string",
       "null"
      ],
      "example": "TRY"
     }
    }
   }
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ]
}