{
 "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}/label": {
   "get": {
    "tags": [
     "Services (all products)"
    ],
    "operationId": "getServiceLabel",
    "summary": "Get the nickname and tags of a service",
    "x-summary-tr": "Hizmetin takma adını ve etiketlerini getir",
    "description": "Customer-defined nickname and colour tags of one of your services (any product line). A service without a label answers `\"nickname\": null` and `\"tags\": []`. Labels are private to the service owner; after a transfer the old owner's label is not shown.",
    "x-description-tr": "Hizmetlerinizden birinin (her ürün hattı) müşteri tanımlı takma adı ve renkli etiketleri. Etiketsiz hizmet `\"nickname\": null` ve `\"tags\": []` döner. Etiketler yalnız hizmet sahibine görünür; devirden sonra eski sahibin etiketi gösterilmez.",
    "x-scope": "services_read",
    "responses": {
     "200": {
      "description": "Label",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "$ref": "#/components/schemas/ServiceLabel"
          }
         }
        },
        "example": {
         "data": {
          "service_id": 12345,
          "nickname": "Accounting server",
          "tags": [
           {
            "name": "production",
            "color": "green"
           },
           {
            "name": "customer-A",
            "color": "blue"
           }
          ],
          "updated_at": "2026-11-10T02:30:00+03:00",
          "colors": [
           "gray",
           "blue",
           "green",
           "red",
           "orange",
           "yellow",
           "purple",
           "pink",
           "teal",
           "indigo"
          ]
         }
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     },
     "429": {
      "$ref": "#/components/responses/RateLimited"
     }
    }
   },
   "parameters": [
    {
     "name": "id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "integer"
     },
     "description": "Service id"
    }
   ]
  }
 },
 "components": {
  "responses": {
   "RateLimited": {
    "description": "Too many requests (`rate_limited`); see the `Retry-After` and `X-RateLimit-*` headers",
    "headers": {
     "Retry-After": {
      "description": "Seconds to wait",
      "schema": {
       "type": "integer"
      }
     }
    },
    "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"
      }
     }
    }
   },
   "Forbidden": {
    "description": "Key lacks the scope, IP not allowed, or feature disabled",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "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."
       }
      }
     }
    }
   },
   "ServiceLabel": {
    "type": "object",
    "properties": {
     "service_id": {
      "type": "integer"
     },
     "nickname": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 60,
      "description": "Shown next to the product name in the client area"
     },
     "tags": {
      "type": "array",
      "maxItems": 10,
      "items": {
       "$ref": "#/components/schemas/ServiceLabelTag"
      }
     },
     "updated_at": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "colors": {
      "type": "array",
      "description": "Allowed colour keys (palette)",
      "items": {
       "type": "string"
      }
     }
    }
   },
   "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"
     }
    }
   }
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ]
}