{
 "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}/object-lock": {
   "put": {
    "tags": [
     "Object storage"
    ],
    "operationId": "setStorageBucketObjectLock",
    "summary": "Set the default retention of a bucket",
    "x-summary-tr": "Kovanın varsayılan saklamasını ayarla",
    "x-scope": "services_write",
    "x-cli": {
     "command": "storage object-lock set",
     "confirm": true
    },
    "description": "Locked buckets only. `mode` GOVERNANCE or COMPLIANCE with `days` 1-3650, or OFF (new objects get no automatic retention; existing locks stay). GOVERNANCE: only Gyro staff can bypass it on request. 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": "Yalnız kilitli kovalar. `mode` GOVERNANCE ya da COMPLIANCE ve `days` 1-3650, ya da OFF (yeni nesnelere otomatik saklama yok; mevcut kilitler sürer). GOVERNANCE: yalnız Gyro personeli talep üzerine aşabilir. 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/StorageBucketObjectLock"
          }
         }
        }
       }
      }
     },
     "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": {
         "mode": {
          "type": "string",
          "enum": [
           "GOVERNANCE",
           "COMPLIANCE",
           "OFF"
          ]
         },
         "days": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3650,
          "description": "Retention days (not with OFF)"
         },
         "acknowledge": {
          "type": "string",
          "enum": [
           "COMPLIANCE"
          ],
          "description": "COMPLIANCE only: type COMPLIANCE to accept that it cannot be removed",
          "x-description-tr": "Yalnız COMPLIANCE: kaldırılamayacağını kabul için COMPLIANCE yazın"
         },
         "confirm": {
          "type": "boolean"
         }
        },
        "required": [
         "mode"
        ]
       }
      }
     }
    }
   }
  }
 },
 "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."
       }
      }
     }
    }
   },
   "StorageBucketObjectLock": {
    "type": "object",
    "properties": {
     "bucket": {
      "type": "string"
     },
     "object_lock": {
      "type": "boolean"
     },
     "default_retention": {
      "$ref": "#/components/schemas/StorageDefaultRetention"
     }
    }
   },
   "StorageDefaultRetention": {
    "type": [
     "object",
     "null"
    ],
    "properties": {
     "mode": {
      "type": "string",
      "enum": [
       "GOVERNANCE",
       "COMPLIANCE"
      ]
     },
     "days": {
      "type": [
       "integer",
       "null"
      ]
     },
     "years": {
      "type": [
       "integer",
       "null"
      ]
     }
    }
   }
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ]
}