{
 "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/containers/{id}/registry/imports": {
   "get": {
    "tags": [
     "Containers"
    ],
    "operationId": "listContainerImageImports",
    "summary": "Image imports (progress and history)",
    "x-summary-tr": "İmaj içe aktarmaları (ilerleme ve geçmiş)",
    "x-scope": "services_read",
    "x-cli": {
     "command": "container registry imports"
    },
    "description": "`active` = the running import (or null) with `phase`, `bytes_done`/`bytes_total`, `layers_done`/`layers`; `jobs` = the last 20 imports (newest first) with `state` and, when failed, `error` + `message`; `limits`.",
    "x-description-tr": "`active` = süren içe aktarma (ya da null): `phase`, bayt ve katman ilerlemesi; `jobs` = son 20 içe aktarma (yeniden eskiye), başarısızsa `error` + `message`; `limits`.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      },
      "description": "Container environment (service) id"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "object",
           "properties": {
            "active": {
             "oneOf": [
              {
               "$ref": "#/components/schemas/ContainerImageImport"
              },
              {
               "type": "null"
              }
             ]
            },
            "jobs": {
             "type": "array",
             "items": {
              "$ref": "#/components/schemas/ContainerImageImport"
             }
            },
            "limits": {
             "type": "object"
            }
           }
          }
         }
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     },
     "409": {
      "$ref": "#/components/responses/Conflict"
     },
     "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"
      }
     }
    }
   },
   "Conflict": {
    "description": "State conflict (`server_locked`, `not_actionable`, `ssh_key_exists`, `server_limit`, `idempotency_in_flight`)",
    "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."
       }
      }
     }
    }
   },
   "ContainerImageImport": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "example": "imp-1a2b3c4d5e6f"
     },
     "source": {
      "type": "string",
      "example": "docker.io/library/nginx:1.27",
      "description": "normalised source (never contains credentials)"
     },
     "target": {
      "type": "string",
      "example": "registry.ist.gyrohosting.com/ab12cd/nginx:1.27",
      "description": "image reference to use in a service"
     },
     "repo": {
      "type": "string"
     },
     "tag": {
      "type": "string"
     },
     "state": {
      "type": "string",
      "enum": [
       "running",
       "done",
       "failed"
      ]
     },
     "phase": {
      "type": "string",
      "enum": [
       "queued",
       "auth",
       "manifest",
       "layers",
       "finalize",
       "done"
      ]
     },
     "bytes_total": {
      "type": "integer"
     },
     "bytes_done": {
      "type": "integer"
     },
     "layers": {
      "type": "integer"
     },
     "layers_done": {
      "type": "integer"
     },
     "digest": {
      "type": "string"
     },
     "platform": {
      "type": "string",
      "example": "linux/amd64"
     },
     "private": {
      "type": "boolean",
      "description": "credentials were used (not stored)"
     },
     "error": {
      "type": "string",
      "description": "source_blocked, insecure_source, source_unauthorized, source_not_found, source_unreachable, source_tls, source_rate_limited, source_error, source_corrupt, platform_unsupported, not_an_image, unsupported_image, too_many_layers, manifest_too_large, registry_full, import_timeout, interrupted, import_failed"
     },
     "message": {
      "type": "string"
     },
     "started": {
      "type": "string",
      "format": "date-time"
     },
     "updated": {
      "type": "string",
      "format": "date-time"
     },
     "finished": {
      "type": "string",
      "format": "date-time"
     }
    }
   }
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ]
}