{
 "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/storage/{id}/buckets/{bucket}/objects/retention": {
   "put": {
    "tags": [
     "Object storage"
    ],
    "operationId": "setStorageObjectRetention",
    "summary": "Lock an object version",
    "x-summary-tr": "Nesne sürümünü kilitle",
    "x-scope": "services_write",
    "x-cli": {
     "command": "storage object retention set",
     "confirm": true
    },
    "description": "Sets or extends the retention of one version (`version_id` empty = current) for `days` 1-3650 from now. Retention can only be extended; COMPLIANCE cannot be switched to GOVERNANCE. COMPLIANCE cannot be shortened, switched to GOVERNANCE or removed by anyone (Gyro included) until it expires; the data is kept and the service keeps being billed until then, even after cancellation. Send `\"confirm\": true` and `\"acknowledge\": \"COMPLIANCE\"`.",
    "x-description-tr": "Bir sürümün saklamasını şimdiden itibaren `days` (1-3650) gün olarak koyar ya da uzatır (`version_id` boş = güncel). Saklama yalnız uzatılabilir; COMPLIANCE GOVERNANCE'a çevrilemez. COMPLIANCE kilidi süresi dolana kadar kimse (Gyro dahil) kısaltamaz, GOVERNANCE'a çeviremez, kaldıramaz; veri saklanır ve iptalde bile süre sonuna kadar ücret sürer. `\"confirm\": true` ve `\"acknowledge\": \"COMPLIANCE\"` gönderin.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      },
      "description": "Service id (Protected Storage)"
     },
     {
      "name": "bucket",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Bucket name (full name, with the -code suffix)"
     }
    ],
    "responses": {
     "202": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "$ref": "#/components/schemas/StorageObjectRetention"
          }
         }
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     },
     "409": {
      "description": "feature_not_available (standard Object Storage service) or not_actionable",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "$ref": "#/components/responses/Validation"
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "key": {
          "type": "string"
         },
         "version_id": {
          "type": "string",
          "description": "Empty = current version"
         },
         "mode": {
          "type": "string",
          "enum": [
           "GOVERNANCE",
           "COMPLIANCE"
          ]
         },
         "days": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3650
         },
         "acknowledge": {
          "type": "string",
          "enum": [
           "COMPLIANCE"
          ],
          "description": "COMPLIANCE only: type COMPLIANCE",
          "x-description-tr": "Yalnız COMPLIANCE: COMPLIANCE yazın"
         },
         "confirm": {
          "type": "boolean"
         }
        },
        "required": [
         "key",
         "mode",
         "days"
        ]
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "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."
       }
      }
     }
    }
   },
   "StorageObjectRetention": {
    "type": "object",
    "properties": {
     "bucket": {
      "type": "string"
     },
     "key": {
      "type": "string"
     },
     "version_id": {
      "type": "string"
     },
     "size": {
      "type": "integer"
     },
     "mode": {
      "type": [
       "string",
       "null"
      ],
      "enum": [
       "GOVERNANCE",
       "COMPLIANCE",
       null
      ]
     },
     "retain_until": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "retention_active": {
      "type": "boolean"
     },
     "legal_hold": {
      "type": "boolean"
     }
    }
   }
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ]
}