{
 "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/bulk": {
   "post": {
    "tags": [
     "Server actions"
    ],
    "operationId": "bulkServerAction",
    "summary": "Run one action on up to 50 servers",
    "x-summary-tr": "Bir eylemi 50 sunucuya kadar toplu çalıştır",
    "x-scope": "cloud_write",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "action",
         "server_ids"
        ],
        "properties": {
         "action": {
          "type": "string",
          "enum": [
           "poweron",
           "shutdown",
           "reboot",
           "poweroff",
           "reset",
           "rebuild",
           "disable_rescue"
          ]
         },
         "server_ids": {
          "type": "array",
          "items": {
           "type": "integer"
          },
          "maxItems": 50
         },
         "image": {
          "type": "string"
         },
         "confirm": {
          "type": "boolean"
         }
        }
       }
      }
     }
    },
    "responses": {
     "207": {
      "description": "Per-target results",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "$ref": "#/components/schemas/BulkResult"
          }
         }
        }
       }
      }
     },
     "422": {
      "$ref": "#/components/responses/Validation"
     }
    }
   }
  }
 },
 "components": {
  "responses": {
   "Validation": {
    "description": "Validation or business rule failure (`confirm_required`, `invalid_image`, `tool_action_failed` ...)",
    "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."
       }
      }
     }
    }
   },
   "BulkResult": {
    "type": "object",
    "properties": {
     "action": {
      "type": "string"
     },
     "succeeded": {
      "type": "integer"
     },
     "failed": {
      "type": "integer"
     },
     "results": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "server_id": {
         "type": "integer"
        },
        "ok": {
         "type": "boolean"
        },
        "status": {
         "type": "string"
        },
        "error": {
         "type": "object",
         "properties": {
          "code": {
           "type": "string"
          },
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ]
}