{
  "openapi": "3.1.0",
  "info": {
    "title": "ServersCamp API",
    "version": "1.0",
    "description": "Manage ServersCamp resources with an API token. Make tokens in the Cloud Panel under Settings, API tokens, and send one as `Authorization: Bearer sc_...`."
  },
  "servers": [
    {
      "url": "https://platform.serverscamp.com"
    }
  ],
  "tags": [
    {
      "name": "catalog",
      "x-displayName": "Plans, disks and images"
    },
    {
      "name": "servers",
      "x-displayName": "Servers"
    },
    {
      "name": "power",
      "x-displayName": "Power"
    },
    {
      "name": "rebuild",
      "x-displayName": "Plan, disk and reinstall"
    },
    {
      "name": "network",
      "x-displayName": "Addresses"
    },
    {
      "name": "metrics",
      "x-displayName": "Metrics"
    },
    {
      "name": "ssh-keys",
      "x-displayName": "SSH keys"
    }
  ],
  "paths": {
    "/api/v1/vm-classes": {
      "get": {
        "parameters": [
          {
            "name": "line",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(legacy|v2|all)$",
              "description": "legacy: the plans sold until November 2026 (the default, for scripts written then); v2: basic-4g, hf-4g-dedicated and the like; all: both.",
              "default": "legacy",
              "title": "Line"
            },
            "description": "legacy: the plans sold until November 2026 (the default, for scripts written then); v2: basic-4g, hf-4g-dedicated and the like; all: both."
          }
        ],
        "operationId": "list-plans",
        "summary": "List plans",
        "description": "The plans. Ask with line=v2 for the ones on sale: basic-1g to basic-64g on Basic hardware and hf-1g to hf-64g on High Frequency, each with a -dedicated twin of the same size. Their ids go into Create a VM and Change the plan.",
        "tags": [
          "catalog"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmPlanList"
                },
                "example": {
                  "items": [
                    {
                      "id": 49,
                      "name": "basic-4g",
                      "cpu_cores": 2,
                      "memory_mb": 4096,
                      "cpu_mode": "burst",
                      "cpu_min_usage": 35,
                      "price_per_hour_millicents": 104.17,
                      "hardware_class_id": 1,
                      "hardware_class_slug": "legacy",
                      "hardware_class_name": "Basic",
                      "line": "v2",
                      "locked": false,
                      "sold_out": false
                    },
                    {
                      "id": 50,
                      "name": "basic-4g-dedicated",
                      "cpu_cores": 2,
                      "memory_mb": 4096,
                      "cpu_mode": "dedicated",
                      "cpu_min_usage": 100,
                      "price_per_hour_millicents": 152.78,
                      "hardware_class_id": 1,
                      "hardware_class_slug": "legacy",
                      "hardware_class_name": "Basic",
                      "line": "v2",
                      "locked": false,
                      "sold_out": false
                    }
                  ],
                  "total": 2
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "catalog",
        "x-order": 0
      }
    },
    "/api/v1/storage-classes": {
      "get": {
        "parameters": [
          {
            "name": "line",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(legacy|v2|all)$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this line: legacy (the R/W tiers) or v2 (Standard and Enterprise). All when omitted or all.",
              "title": "Line"
            },
            "description": "Only this line: legacy (the R/W tiers) or v2 (Standard and Enterprise). All when omitted or all."
          }
        ],
        "operationId": "list-disks",
        "summary": "List disks",
        "description": "The disks. Ask with line=v2 for the ones on sale: standard and enterprise, each also dedicated. Their ids go into Create a VM, Change the disk and volumes.",
        "tags": [
          "catalog"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmDiskList"
                },
                "example": {
                  "items": [
                    {
                      "id": 18,
                      "name": "standard",
                      "dedicated": false,
                      "read_iops_limit": 100000,
                      "write_iops_limit": 100000,
                      "read_bandwidth_limit": 1024,
                      "write_bandwidth_limit": 1024,
                      "min_size_gb": 25,
                      "max_size_gb": 5000,
                      "free_size_gb": 25,
                      "price_per_gb_hour_millicents": 1.1111,
                      "line": "v2"
                    }
                  ],
                  "total": 1
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "catalog",
        "x-order": 1
      }
    },
    "/api/v1/vm-templates": {
      "get": {
        "parameters": [
          {
            "name": "include_inactive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include deactivated templates. Default false (only selectable templates, for VM creation). Set true for display/name resolution of existing VMs whose template was later deactivated.",
              "default": false,
              "title": "Include Inactive"
            },
            "description": "Include deactivated templates. Default false (only selectable templates, for VM creation). Set true for display/name resolution of existing VMs whose template was later deactivated."
          }
        ],
        "operationId": "list-images",
        "summary": "List images",
        "description": "The systems a server can be created or reinstalled with.",
        "tags": [
          "catalog"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmImageList"
                },
                "example": {
                  "items": [
                    {
                      "id": 5,
                      "name": "Ubuntu 26.04 LTS",
                      "os_type": "Ubuntu",
                      "os_family": "linux",
                      "version": "26.04"
                    },
                    {
                      "id": 3,
                      "name": "Debian 13",
                      "os_type": "Debian",
                      "os_family": "linux",
                      "version": "13"
                    }
                  ],
                  "total": 2
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "catalog",
        "x-order": 2
      }
    },
    "/api/v1/network": {
      "get": {
        "operationId": "list-networks",
        "summary": "List networks",
        "description": "The private networks of the account. Every account starts with one on a router, so a server in it can have a public address.",
        "tags": [
          "catalog"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetworkListResponse"
                },
                "example": {
                  "items": [
                    {
                      "network_uuid": "a3e1f0c2-7d4b-4c6e-8f9a-0b1c2d3e4f50",
                      "name": "default",
                      "cidr": "10.0.0.0/24",
                      "network_type": "private",
                      "router_uuid": "5c0d9e8f-1a2b-4c3d-8e7f-6a5b4c3d2e1f",
                      "status": "active",
                      "status_error": null,
                      "created_at": "2026-10-20T10:00:00Z"
                    }
                  ],
                  "total": 1
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "catalog",
        "x-order": 3
      }
    },
    "/api/v1/security-groups": {
      "get": {
        "operationId": "list-security-groups",
        "summary": "List security groups",
        "description": "The firewalls of the account. A server goes into the default group when Create a VM names none.",
        "tags": [
          "catalog"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityGroupListResponse"
                },
                "example": {
                  "items": [
                    {
                      "id": 7,
                      "sg_uuid": "0e9d8c7b-6a5f-4e3d-2c1b-0a9f8e7d6c5b",
                      "name": "default",
                      "sg_name": "sg-0e9d8c7b",
                      "description": "Default security group",
                      "created_at": "2026-10-20T10:00:00Z",
                      "updated_at": "2026-10-20T10:00:00Z"
                    }
                  ],
                  "total": 1
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "catalog",
        "x-order": 4
      }
    },
    "/api/v1/vms": {
      "post": {
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any string of yours, up to 200 characters. The same key within 24 hours answers with the server the first request made instead of making a second one.",
              "title": "Idempotency-Key"
            },
            "description": "Any string of yours, up to 200 characters. The same key within 24 hours answers with the server the first request made instead of making a second one."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VMCreate"
              },
              "example": {
                "display_name": "web-1",
                "vm_class_id": 49,
                "vm_template_id": 5,
                "storage_class_id": 18,
                "disk_gb": 50,
                "network_uuid": "a3e1f0c2-7d4b-4c6e-8f9a-0b1c2d3e4f50",
                "ssh_key_id": 42,
                "assign_public_ips": true
              },
              "examples": {
                "e0": {
                  "summary": "SSH key and a public address",
                  "value": {
                    "display_name": "web-1",
                    "vm_class_id": 49,
                    "vm_template_id": 5,
                    "storage_class_id": 18,
                    "disk_gb": 50,
                    "network_uuid": "a3e1f0c2-7d4b-4c6e-8f9a-0b1c2d3e4f50",
                    "ssh_key_id": 42,
                    "assign_public_ips": true
                  }
                },
                "e1": {
                  "summary": "Password only",
                  "value": {
                    "display_name": "test-1",
                    "vm_class_id": 49,
                    "vm_template_id": 5,
                    "storage_class_id": 18,
                    "disk_gb": 50,
                    "network_uuid": "a3e1f0c2-7d4b-4c6e-8f9a-0b1c2d3e4f50",
                    "assign_public_ips": true,
                    "os_password": "change-me-to-a-long-one"
                  }
                },
                "e2": {
                  "summary": "With user data",
                  "value": {
                    "display_name": "web-2",
                    "vm_class_id": 49,
                    "vm_template_id": 5,
                    "storage_class_id": 18,
                    "disk_gb": 50,
                    "network_uuid": "a3e1f0c2-7d4b-4c6e-8f9a-0b1c2d3e4f50",
                    "ssh_key_id": 42,
                    "assign_public_ips": true,
                    "user_data": "#cloud-config\npackages:\n  - nginx\nruncmd:\n  - systemctl enable --now nginx\n"
                  }
                },
                "e3": {
                  "summary": "Dedicated plan on an Enterprise disk",
                  "value": {
                    "display_name": "db-1",
                    "vm_class_id": 66,
                    "vm_template_id": 5,
                    "storage_class_id": 20,
                    "disk_gb": 200,
                    "network_uuid": "a3e1f0c2-7d4b-4c6e-8f9a-0b1c2d3e4f50",
                    "ssh_key_id": 42,
                    "assign_public_ips": true
                  }
                },
                "e4": {
                  "summary": "Safe to retry",
                  "value": {
                    "display_name": "web-1",
                    "vm_class_id": 49,
                    "vm_template_id": 5,
                    "storage_class_id": 18,
                    "disk_gb": 50,
                    "network_uuid": "a3e1f0c2-7d4b-4c6e-8f9a-0b1c2d3e4f50",
                    "ssh_key_id": 42,
                    "assign_public_ips": true
                  },
                  "x-headers": {
                    "Idempotency-Key": "web-1-2026-11-01"
                  },
                  "description": "Got no answer, a timeout or a dropped connection? Send the same request with the same key: it answers with the server the first one made, and no second server is created."
                }
              }
            }
          }
        },
        "operationId": "create",
        "summary": "Create a VM",
        "description": "Creates a server and starts it, usually in about a minute; poll Get a VM until its status is active. You log in as scamp, with sudo, with the SSH key, the password or both. With assign_public_ips the server gets a public IPv4 and IPv6 once it is up. The first hour is charged at once and then every hour after it. Send an Idempotency-Key header to retry safely: the same key within 24 hours answers with the same server instead of making a second one.",
        "tags": [
          "servers"
        ],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmCreated"
                },
                "example": {
                  "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
                  "display_name": "web-1",
                  "status": "queued",
                  "os_user": "scamp",
                  "os_password": "Rk7vQ2mXp9LwT4sN"
                }
              }
            }
          },
          "400": {
            "description": "A plan, disk, size or value that is not accepted, or a public address on a network without a router",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "402": {
            "description": "The balance is too low",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "403": {
            "description": "The server limit of the account is reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "404": {
            "description": "No such network or SSH key in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "409": {
            "description": "The plan has no free capacity right now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "servers",
        "x-order": 105,
        "x-wait": "active"
      },
      "get": {
        "parameters": [
          {
            "name": "tag_key",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tag Key"
            },
            "description": "Only servers with this tag"
          },
          {
            "name": "tag_value",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tag Value"
            },
            "description": "Only servers whose tag_key has this value"
          }
        ],
        "operationId": "list",
        "summary": "List VMs",
        "description": "Every server of the account. Filter by a tag with tag_key and tag_value.",
        "tags": [
          "servers"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmList"
                },
                "example": {
                  "items": [
                    {
                      "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
                      "display_name": "web-1",
                      "vm_name": "web-1-k3x9",
                      "status": "active",
                      "state": "running",
                      "error": null,
                      "pending_op": null,
                      "vm_class_id": 49,
                      "vm_class_name": "basic-4g",
                      "cpu_cores": 2,
                      "memory_mb": 4096,
                      "storage_class_id": 18,
                      "storage_class_name": "standard",
                      "disk_gb": 50,
                      "vm_template_id": 5,
                      "os_type": "Ubuntu",
                      "ssh_key_id": 42,
                      "network_uuid": "a3e1f0c2-7d4b-4c6e-8f9a-0b1c2d3e4f50",
                      "network": {
                        "network_uuid": "a3e1f0c2-7d4b-4c6e-8f9a-0b1c2d3e4f50",
                        "ip_internal": "10.0.0.12",
                        "ipv6_address": "2a01:ea05:10:4::12",
                        "public_ip_v4": "185.236.10.44",
                        "public_ip_v6": "2a01:ea05:20:1::44",
                        "floating_ip_v4": null,
                        "floating_ip_v6": null
                      },
                      "os_user": "scamp",
                      "os_password": "Rk7vQ2mXp9LwT4sN",
                      "tags": {
                        "env": "production"
                      },
                      "created_at": "2026-11-01T09:20:14+00:00"
                    }
                  ],
                  "total": 1
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "servers",
        "x-order": 106
      }
    },
    "/api/v1/vms/{vm_uuid}": {
      "get": {
        "parameters": [
          {
            "name": "vm_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vm Uuid"
            },
            "description": "Server id, from Create a VM or List VMs"
          }
        ],
        "operationId": "get",
        "summary": "Get a VM",
        "description": "One server with its status, plan, disk and addresses.",
        "tags": [
          "servers"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Vm"
                },
                "example": {
                  "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
                  "display_name": "web-1",
                  "vm_name": "web-1-k3x9",
                  "status": "active",
                  "state": "running",
                  "error": null,
                  "pending_op": null,
                  "vm_class_id": 49,
                  "vm_class_name": "basic-4g",
                  "cpu_cores": 2,
                  "memory_mb": 4096,
                  "storage_class_id": 18,
                  "storage_class_name": "standard",
                  "disk_gb": 50,
                  "vm_template_id": 5,
                  "os_type": "Ubuntu",
                  "ssh_key_id": 42,
                  "network_uuid": "a3e1f0c2-7d4b-4c6e-8f9a-0b1c2d3e4f50",
                  "network": {
                    "network_uuid": "a3e1f0c2-7d4b-4c6e-8f9a-0b1c2d3e4f50",
                    "ip_internal": "10.0.0.12",
                    "ipv6_address": "2a01:ea05:10:4::12",
                    "public_ip_v4": "185.236.10.44",
                    "public_ip_v6": "2a01:ea05:20:1::44",
                    "floating_ip_v4": null,
                    "floating_ip_v6": null
                  },
                  "os_user": "scamp",
                  "os_password": "Rk7vQ2mXp9LwT4sN",
                  "tags": {
                    "env": "production"
                  },
                  "created_at": "2026-11-01T09:20:14+00:00"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "404": {
            "description": "No such server in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "servers",
        "x-order": 107
      },
      "patch": {
        "parameters": [
          {
            "name": "vm_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vm Uuid"
            },
            "description": "Server id, from Create a VM or List VMs"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VMUpdateRequest"
              },
              "example": {
                "display_name": "web-prod-1"
              },
              "examples": {
                "e0": {
                  "summary": "Rename",
                  "value": {
                    "display_name": "web-prod-1"
                  }
                },
                "e1": {
                  "summary": "Set tags",
                  "value": {
                    "tags": {
                      "env": "production",
                      "team": "web"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "update",
        "summary": "Rename and tag",
        "description": "Changes the name or the tags. Tags replace all the tags the server had.",
        "tags": [
          "servers"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Vm"
                },
                "example": {
                  "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
                  "display_name": "web-prod-1",
                  "vm_name": "web-1-k3x9",
                  "status": "active",
                  "state": "running",
                  "error": null,
                  "pending_op": null,
                  "vm_class_id": 49,
                  "vm_class_name": "basic-4g",
                  "cpu_cores": 2,
                  "memory_mb": 4096,
                  "storage_class_id": 18,
                  "storage_class_name": "standard",
                  "disk_gb": 50,
                  "vm_template_id": 5,
                  "os_type": "Ubuntu",
                  "ssh_key_id": 42,
                  "network_uuid": "a3e1f0c2-7d4b-4c6e-8f9a-0b1c2d3e4f50",
                  "network": {
                    "network_uuid": "a3e1f0c2-7d4b-4c6e-8f9a-0b1c2d3e4f50",
                    "ip_internal": "10.0.0.12",
                    "ipv6_address": "2a01:ea05:10:4::12",
                    "public_ip_v4": "185.236.10.44",
                    "public_ip_v6": "2a01:ea05:20:1::44",
                    "floating_ip_v4": null,
                    "floating_ip_v6": null
                  },
                  "os_user": "scamp",
                  "os_password": "Rk7vQ2mXp9LwT4sN",
                  "tags": {
                    "env": "production"
                  },
                  "created_at": "2026-11-01T09:20:14+00:00"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "404": {
            "description": "No such server in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "servers",
        "x-order": 108
      },
      "delete": {
        "parameters": [
          {
            "name": "vm_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vm Uuid"
            },
            "description": "Server id, from Create a VM or List VMs"
          },
          {
            "name": "delete_backups",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Delete Backups"
            },
            "description": "Delete the server's backups too; kept when left out"
          },
          {
            "name": "delete_snapshots",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Delete Snapshots"
            },
            "description": "Delete the server's snapshots too; kept when left out"
          },
          {
            "name": "delete_volumes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Delete Volumes"
            },
            "description": "Delete the volumes attached to it too; they are detached and kept when left out"
          }
        ],
        "operationId": "delete",
        "summary": "Delete a VM",
        "description": "Deletes the server and its root disk. Its public and floating addresses go back, attached volumes are detached and kept, and backups and snapshots are kept unless you ask to delete them too. Billing for the server stops at once; Get a VM shows status deleting and then answers 404.",
        "tags": [
          "servers"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmDone"
                },
                "example": {
                  "success": true,
                  "message": "VM deletion queued"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "404": {
            "description": "No such server in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "409": {
            "description": "The server is busy with another operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "servers",
        "x-order": 109,
        "x-wait": "gone"
      }
    },
    "/api/v1/vms/{vm_uuid}/power": {
      "post": {
        "parameters": [
          {
            "name": "vm_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vm Uuid"
            },
            "description": "Server id, from Create a VM or List VMs"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VMPowerRequest"
              },
              "example": {
                "action": "reboot"
              },
              "examples": {
                "e0": {
                  "summary": "Reboot",
                  "value": {
                    "action": "reboot"
                  }
                },
                "e1": {
                  "summary": "Start",
                  "value": {
                    "action": "start"
                  }
                },
                "e2": {
                  "summary": "Shut down",
                  "value": {
                    "action": "shutdown"
                  }
                },
                "e3": {
                  "summary": "Power off",
                  "value": {
                    "action": "destroy"
                  }
                },
                "e4": {
                  "summary": "Reset",
                  "value": {
                    "action": "reset"
                  }
                }
              }
            }
          }
        },
        "operationId": "power",
        "summary": "Start, stop, reboot",
        "description": "start boots a stopped server, shutdown turns the system off cleanly and destroy cuts the power. reboot restarts the system cleanly, reset works like the reset button. A stopped server is still billed for its plan.",
        "tags": [
          "power"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmPowerQueued"
                },
                "example": {
                  "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
                  "action": "reboot",
                  "status": "power_control_queued"
                }
              }
            }
          },
          "400": {
            "description": "Not one of the five actions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "402": {
            "description": "Starting needs a positive balance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "409": {
            "description": "The server is busy with another operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "power",
        "x-order": 210,
        "x-wait": "power"
      }
    },
    "/api/v1/vms/{vm_uuid}/resize": {
      "post": {
        "parameters": [
          {
            "name": "vm_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vm Uuid"
            },
            "description": "Server id, from Create a VM or List VMs"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VMResizeRequest"
              },
              "example": {
                "vm_class_id": 50
              },
              "examples": {
                "e0": {
                  "summary": "To dedicated, same size",
                  "value": {
                    "vm_class_id": 50
                  }
                },
                "e1": {
                  "summary": "A bigger plan",
                  "value": {
                    "vm_class_id": 51
                  }
                }
              }
            }
          }
        },
        "operationId": "change-plan",
        "summary": "Change the plan",
        "description": "Moves the server to another plan on the same hardware. Between a plan and its -dedicated twin the change is live; a plan with other vCPU or memory stops the server and starts it again, usually within a minute. The disk and the addresses stay, and the new price applies from the next hour.",
        "tags": [
          "rebuild"
        ],
        "responses": {
          "202": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmResizeJob"
                },
                "example": {
                  "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
                  "from_class_name": "basic-4g",
                  "to_class_name": "basic-4g-dedicated",
                  "needs_restart": false,
                  "step": "queued",
                  "started_at": "2026-11-01T10:02:11+00:00",
                  "completed_at": null,
                  "error": null
                }
              }
            }
          },
          "400": {
            "description": "A plan on other hardware, or one the account may not have",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "404": {
            "description": "No such server in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "409": {
            "description": "The server is busy with another operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "rebuild",
        "x-order": 311,
        "x-wait": "job:resize"
      }
    },
    "/api/v1/vms/{vm_uuid}/resize/status": {
      "get": {
        "parameters": [
          {
            "name": "vm_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vm Uuid"
            },
            "description": "Server id, from Create a VM or List VMs"
          }
        ],
        "operationId": "change-plan-status",
        "summary": "Plan change status",
        "description": "How the last plan change went. Kept for 10 minutes after it ends.",
        "tags": [
          "rebuild"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmResizeJob"
                },
                "example": {
                  "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
                  "from_class_name": "basic-4g",
                  "to_class_name": "basic-4g-dedicated",
                  "needs_restart": false,
                  "step": "done",
                  "started_at": "2026-11-01T10:02:11+00:00",
                  "completed_at": "2026-11-01T10:02:19+00:00",
                  "error": null
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "404": {
            "description": "No plan change of this server is known",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "rebuild",
        "x-order": 312
      }
    },
    "/api/v1/vms/{vm_uuid}/disk/resize": {
      "post": {
        "parameters": [
          {
            "name": "vm_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vm Uuid"
            },
            "description": "Server id, from Create a VM or List VMs"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VMDiskResizeRequest"
              },
              "example": {
                "new_size_gb": 100
              },
              "examples": {
                "e0": {
                  "summary": "To 100 GB",
                  "value": {
                    "new_size_gb": 100
                  }
                }
              }
            }
          }
        },
        "operationId": "grow-disk",
        "summary": "Grow the disk",
        "description": "Grows the root disk while the server runs. A disk cannot shrink. Systems from our images grow their filesystem by themselves; with disk auto-extend on, the server does this on its own before the disk fills up.",
        "tags": [
          "rebuild"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmDiskOp"
                },
                "example": {
                  "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
                  "status": "queued",
                  "disk_gb": 100,
                  "storage_class_id": 18
                }
              }
            }
          },
          "400": {
            "description": "Not bigger than now, or above the disk's largest size",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "409": {
            "description": "The server is busy with another operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "rebuild",
        "x-order": 313
      }
    },
    "/api/v1/vms/{vm_uuid}/disk/change-class": {
      "post": {
        "parameters": [
          {
            "name": "vm_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vm Uuid"
            },
            "description": "Server id, from Create a VM or List VMs"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VMDiskChangeClassRequest"
              },
              "example": {
                "storage_class_id": 19
              },
              "examples": {
                "e0": {
                  "summary": "To dedicated",
                  "value": {
                    "storage_class_id": 19
                  }
                }
              }
            }
          }
        },
        "operationId": "change-disk",
        "summary": "Change the disk",
        "description": "Moves the root disk between shared and dedicated while the server runs. The data stays in place and the new price applies from the next hour.",
        "tags": [
          "rebuild"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmDiskOp"
                },
                "example": {
                  "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
                  "status": "queued",
                  "disk_gb": 50,
                  "storage_class_id": 19
                }
              }
            }
          },
          "400": {
            "description": "A disk the root disk cannot move to, or the one it has",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "409": {
            "description": "The server is busy with another operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "rebuild",
        "x-order": 314
      }
    },
    "/api/v1/vms/{vm_uuid}/reinstall": {
      "post": {
        "parameters": [
          {
            "name": "vm_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vm Uuid"
            },
            "description": "Server id, from Create a VM or List VMs"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VMReinstallRequest"
              },
              "example": {
                "vm_template_id": 5
              },
              "examples": {
                "e0": {
                  "summary": "Same system",
                  "value": {
                    "vm_template_id": 5
                  }
                },
                "e1": {
                  "summary": "Another system",
                  "value": {
                    "vm_template_id": 3
                  }
                }
              }
            }
          }
        },
        "operationId": "reinstall",
        "summary": "Reinstall",
        "description": "A fresh root disk with the image you give. The addresses, the network, attached volumes, the SSH key and the password stay; snapshots and backups stay in the account.",
        "tags": [
          "rebuild"
        ],
        "responses": {
          "202": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmReinstallJob"
                },
                "example": {
                  "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
                  "from_template_name": "Ubuntu 26.04 LTS",
                  "to_template_name": "Debian 13",
                  "step": "queued",
                  "started_at": "2026-11-01T10:05:00+00:00",
                  "completed_at": null,
                  "error": null
                }
              }
            }
          },
          "400": {
            "description": "An image that is not accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "409": {
            "description": "The server is busy with another operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "rebuild",
        "x-order": 315,
        "x-wait": "job:reinstall"
      }
    },
    "/api/v1/vms/{vm_uuid}/reinstall/status": {
      "get": {
        "parameters": [
          {
            "name": "vm_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vm Uuid"
            },
            "description": "Server id, from Create a VM or List VMs"
          }
        ],
        "operationId": "reinstall-status",
        "summary": "Reinstall status",
        "description": "How the last reinstall went. Kept for 30 minutes after it ends.",
        "tags": [
          "rebuild"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmReinstallJob"
                },
                "example": {
                  "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
                  "from_template_name": "Ubuntu 26.04 LTS",
                  "to_template_name": "Debian 13",
                  "step": "done",
                  "started_at": "2026-11-01T10:05:00+00:00",
                  "completed_at": "2026-11-01T10:06:12+00:00",
                  "error": null
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "404": {
            "description": "No reinstall of this server is known",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "rebuild",
        "x-order": 316
      }
    },
    "/api/v1/vms/{vm_uuid}/public-ip": {
      "post": {
        "parameters": [
          {
            "name": "vm_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vm Uuid"
            },
            "description": "Server id, from Create a VM or List VMs"
          }
        ],
        "operationId": "add-public-ip",
        "summary": "Add a public address",
        "description": "Gives the server its own public IPv4 and IPv6 address, billed by the hour while it has them. This is the server's own pair, not a floating IP.",
        "tags": [
          "network"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmPublicIp"
                },
                "example": {
                  "public_ip_v4": "185.236.10.44",
                  "public_ip_v6": "2a01:ea05:20:1::44"
                }
              }
            }
          },
          "400": {
            "description": "The server's network is not on a router",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "409": {
            "description": "The server has an address already, or is not active",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "network",
        "x-order": 417
      },
      "delete": {
        "parameters": [
          {
            "name": "vm_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vm Uuid"
            },
            "description": "Server id, from Create a VM or List VMs"
          }
        ],
        "operationId": "remove-public-ip",
        "summary": "Remove the public address",
        "description": "The IPv4 and IPv6 go back and billing for them stops. Floating IPs on the server stay.",
        "tags": [
          "network"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmPublicIp"
                },
                "example": {
                  "public_ip_v4": null,
                  "public_ip_v6": null
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "404": {
            "description": "No such server in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "network",
        "x-order": 418
      }
    },
    "/api/v1/vms/{vm_uuid}/dns/ptr": {
      "put": {
        "parameters": [
          {
            "name": "vm_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vm Uuid"
            },
            "description": "Server id, from Create a VM or List VMs"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VMPtrUpdate"
              },
              "example": {
                "hostname": "mail.example.com"
              },
              "examples": {
                "e0": {
                  "summary": "Set a name",
                  "value": {
                    "hostname": "mail.example.com"
                  }
                }
              }
            }
          }
        },
        "operationId": "reverse-dns",
        "summary": "Set reverse DNS",
        "description": "Sets the name the server's public addresses resolve back to.",
        "tags": [
          "network"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmPtr"
                },
                "example": {
                  "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
                  "hostname": "mail.example.com"
                }
              }
            }
          },
          "400": {
            "description": "Not a full domain name",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "404": {
            "description": "No such server in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "network",
        "x-order": 419
      }
    },
    "/api/v1/vms/{vm_uuid}/metrics": {
      "get": {
        "parameters": [
          {
            "name": "vm_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vm Uuid"
            },
            "description": "Server id, from Create a VM or List VMs"
          },
          {
            "name": "window",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "One of 5m / 15m / 30m / 1h / 2h / 6h / 12h / 24h / 3d / 7d / 30d",
              "default": "1h",
              "title": "Window"
            },
            "description": "5m, 15m, 30m, 1h, 2h, 6h, 12h, 24h, 3d, 7d or 30d; 1h when left out"
          }
        ],
        "operationId": "metrics",
        "summary": "Get metrics",
        "description": "CPU, disk and network from the host side, averaged over each point, for the window you ask for.",
        "tags": [
          "metrics"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmMetrics"
                },
                "example": {
                  "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
                  "window": "1h",
                  "resolution_seconds": 60,
                  "current": {
                    "ts": 1793532000,
                    "cpu_pct": 7.4,
                    "disk_rd_iops": 3,
                    "disk_wr_iops": 41,
                    "disk_rd_bps": 12288,
                    "disk_wr_bps": 409600,
                    "rx_bps": 18432,
                    "tx_bps": 92160
                  },
                  "points": [
                    {
                      "ts": 1793531940,
                      "cpu_pct": 6.9,
                      "disk_rd_iops": 2,
                      "disk_wr_iops": 38,
                      "disk_rd_bps": 8192,
                      "disk_wr_bps": 389120,
                      "rx_bps": 17408,
                      "tx_bps": 88064
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Not one of the windows",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "metrics",
        "x-order": 520
      }
    },
    "/api/v1/ssh-keys": {
      "get": {
        "operationId": "list-ssh-keys",
        "summary": "List SSH keys",
        "description": "The keys of the account. Their ids go into ssh_key_id of Create a VM.",
        "tags": [
          "ssh-keys"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSHKeyListResponse"
                },
                "example": {
                  "items": [
                    {
                      "id": 42,
                      "key_name": "laptop",
                      "key_type": "ed25519",
                      "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... me@laptop",
                      "fingerprint": "SHA256:7Ke...",
                      "has_private_key": false,
                      "created_at": "2026-10-20T10:00:00Z"
                    }
                  ],
                  "total": 1
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "ssh-keys",
        "x-order": 621
      }
    },
    "/api/v1/ssh-keys/import": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSHKeyImport"
              },
              "example": {
                "key_name": "laptop",
                "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... me@laptop"
              },
              "examples": {
                "e0": {
                  "summary": "Add a key",
                  "value": {
                    "key_name": "laptop",
                    "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... me@laptop"
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "import-ssh-key",
        "summary": "Add an SSH key",
        "description": "Adds a public key you already have.",
        "tags": [
          "ssh-keys"
        ],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSHKeyResponse"
                },
                "example": {
                  "id": 42,
                  "key_name": "laptop",
                  "key_type": "ed25519",
                  "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... me@laptop",
                  "fingerprint": "SHA256:7Ke...",
                  "has_private_key": false,
                  "created_at": "2026-10-23T09:00:00Z"
                }
              }
            }
          },
          "400": {
            "description": "Not a public key in OpenSSH format",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "409": {
            "description": "The key is already in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "ssh-keys",
        "x-order": 622
      }
    },
    "/api/v1/ssh-keys/{key_id}": {
      "get": {
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Key Id"
            },
            "description": "SSH key id, from List SSH keys"
          }
        ],
        "operationId": "get-ssh-key",
        "summary": "Get an SSH key",
        "description": "One key of the account.",
        "tags": [
          "ssh-keys"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSHKeyResponse"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "404": {
            "description": "No such key in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "ssh-keys",
        "x-order": 623
      },
      "delete": {
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Key Id"
            },
            "description": "SSH key id, from List SSH keys"
          }
        ],
        "operationId": "delete-ssh-key",
        "summary": "Delete an SSH key",
        "description": "Deletes a key from the account. Servers that have it keep it.",
        "tags": [
          "ssh-keys"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                },
                "example": {
                  "success": true,
                  "message": "SSH key deleted"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "404": {
            "description": "No such key in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmError"
                }
              }
            }
          }
        },
        "x-group": "ssh-keys",
        "x-order": 624
      }
    }
  },
  "components": {
    "schemas": {
      "NetworkListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/NetworkResponse"
            },
            "type": "array",
            "title": "Items",
            "description": "List of networks"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of networks"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "NetworkListResponse",
        "description": "Paginated network list."
      },
      "NetworkResponse": {
        "properties": {
          "network_uuid": {
            "type": "string",
            "title": "Network Uuid",
            "description": "Network UUID"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Network name"
          },
          "cidr": {
            "type": "string",
            "title": "Cidr",
            "description": "Network CIDR"
          },
          "network_type": {
            "type": "string",
            "title": "Network Type",
            "description": "Network type: private or public",
            "default": "private"
          },
          "router_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Router Uuid",
            "description": "Attached router UUID"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Network status: pending, active, attaching, detaching, deleting, failed",
            "default": "active"
          },
          "status_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Error",
            "description": "Error message when the last operation failed"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At",
            "description": "Creation timestamp"
          }
        },
        "type": "object",
        "required": [
          "network_uuid",
          "name",
          "cidr"
        ],
        "title": "NetworkResponse",
        "description": "Network details response."
      },
      "SSHKeyImport": {
        "properties": {
          "key_name": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Za-z0-9 ._-]{1,64}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key Name",
            "description": "Key name (letters, digits, space, . _ -; max 64). Auto-generated if empty."
          },
          "public_key": {
            "type": "string",
            "maxLength": 8192,
            "minLength": 16,
            "title": "Public Key",
            "description": "Public key in OpenSSH format (e.g., 'ssh-ed25519 AAAA... comment')"
          }
        },
        "type": "object",
        "required": [
          "public_key"
        ],
        "title": "SSHKeyImport",
        "description": "Request to import existing public key."
      },
      "SSHKeyListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SSHKeyResponse"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of keys"
          }
        },
        "type": "object",
        "required": [
          "total"
        ],
        "title": "SSHKeyListResponse",
        "description": "List of SSH keys."
      },
      "SSHKeyResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Key ID"
          },
          "key_name": {
            "type": "string",
            "title": "Key Name",
            "description": "Key name"
          },
          "key_type": {
            "type": "string",
            "title": "Key Type",
            "description": "Key type (ed25519, rsa, ecdsa, etc.)"
          },
          "public_key": {
            "type": "string",
            "title": "Public Key",
            "description": "Public key in OpenSSH format"
          },
          "fingerprint": {
            "type": "string",
            "title": "Fingerprint",
            "description": "Key fingerprint (SHA256)"
          },
          "has_private_key": {
            "type": "boolean",
            "title": "Has Private Key",
            "description": "Whether private key is available for download"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comment",
            "description": "Trailing comment from OpenSSH public key (e.g. user@host)"
          },
          "bits": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bits",
            "description": "Key strength in bits"
          },
          "source": {
            "type": "string",
            "title": "Source",
            "description": "'generated' if private key is stored, else 'imported'",
            "default": "imported"
          },
          "strength": {
            "type": "string",
            "title": "Strength",
            "description": "'modern' for ed25519/ecdsa, 'legacy' for rsa",
            "default": "modern"
          },
          "state": {
            "type": "string",
            "title": "State",
            "description": "'in-use' if at least one VM trusts this key, else 'unused'",
            "default": "unused"
          },
          "last_attached_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Attached At",
            "description": "When the most recent VM using this key was created"
          },
          "trusted_by": {
            "items": {
              "$ref": "#/components/schemas/SSHKeyTrustedVM"
            },
            "type": "array",
            "title": "Trusted By",
            "description": "VMs that have this key installed"
          }
        },
        "type": "object",
        "required": [
          "id",
          "key_name",
          "key_type",
          "public_key",
          "fingerprint",
          "has_private_key"
        ],
        "title": "SSHKeyResponse",
        "description": "SSH key response."
      },
      "SSHKeyTrustedVM": {
        "properties": {
          "vm_uuid": {
            "type": "string",
            "title": "Vm Uuid"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "vm_uuid",
          "name"
        ],
        "title": "SSHKeyTrustedVM"
      },
      "SecurityGroupListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SecurityGroupResponse"
            },
            "type": "array",
            "title": "Items",
            "description": "List of security groups"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total count"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "SecurityGroupListResponse",
        "description": "List of security groups."
      },
      "SecurityGroupResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Internal ID"
          },
          "sg_uuid": {
            "type": "string",
            "title": "Sg Uuid",
            "description": "Security group UUID"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "User-defined name"
          },
          "sg_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sg Name",
            "description": "Internal name (sg-xxx format)"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Group description"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "Last update timestamp"
          }
        },
        "type": "object",
        "required": [
          "id",
          "sg_uuid",
          "created_at",
          "updated_at"
        ],
        "title": "SecurityGroupResponse",
        "description": "Security group details response."
      },
      "SuccessResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Operation success",
            "default": true
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message",
            "description": "Success message"
          },
          "data": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Data",
            "description": "Additional data"
          }
        },
        "type": "object",
        "title": "SuccessResponse",
        "description": "Standard success response."
      },
      "VMAutoextendIn": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true,
            "description": "Auto-extend on"
          },
          "at_pct": {
            "type": "integer",
            "maximum": 95,
            "minimum": 50,
            "title": "At Pct",
            "description": "Grow when the root filesystem is this full, percent",
            "default": 85
          },
          "step_pct": {
            "type": "integer",
            "title": "Step Pct",
            "description": "Grow by this share of the current disk size: 10, 20, 30 or 50 percent. Rounded to 5 GB, at least 5 GB.",
            "default": 10
          },
          "max_gb": {
            "type": "integer",
            "maximum": 100000,
            "minimum": 1,
            "title": "Max Gb",
            "description": "Never grow the disk past this size, GB"
          }
        },
        "type": "object",
        "required": [
          "max_gb"
        ],
        "title": "VMAutoextendIn",
        "description": "Disk auto-extend settings of a VM."
      },
      "VMCreate": {
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name",
            "description": "Name of the server, up to 100 characters"
          },
          "vm_class_id": {
            "type": "integer",
            "title": "Vm Class Id",
            "description": "Plan id, from List plans"
          },
          "storage_class_id": {
            "type": "integer",
            "title": "Storage Class Id",
            "description": "Disk id of the root disk, from List disks"
          },
          "vm_template_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Template Id",
            "description": "Image id, from List images. Give this, or source_snapshot_id or source_backup_id"
          },
          "source_snapshot_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Snapshot Id",
            "description": "Make the server from a snapshot of another one"
          },
          "source_backup_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Backup Id",
            "description": "Make the server from a backup"
          },
          "network_uuid": {
            "type": "string",
            "title": "Network Uuid",
            "description": "Private network, from List networks"
          },
          "sg_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sg Uuid",
            "description": "Security group, from List security groups; the default group of the account when left out"
          },
          "ssh_key_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ssh Key Id",
            "description": "SSH key of the scamp user, from List SSH keys"
          },
          "disk_gb": {
            "type": "integer",
            "maximum": 5000,
            "minimum": 10,
            "title": "Disk Gb",
            "description": "Root disk size, GB. The first 25 GB of a standard disk are free"
          },
          "os_password": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64,
                "minLength": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Password",
            "description": "Password of the scamp user, 8 to 64 characters; generated and returned when left out"
          },
          "assign_public_ips": {
            "type": "boolean",
            "title": "Assign Public Ips",
            "description": "Give the server a public IPv4 and IPv6 address. The network has to be on a router",
            "default": false
          },
          "tags": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags",
            "description": "Your tags, up to 10: key up to 64 characters, value up to 256",
            "examples": [
              {
                "env": "production",
                "team": "backend"
              }
            ]
          },
          "monitoring": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monitoring",
            "description": "The guest agent and monitoring; on when left out. Disk auto-extend needs them"
          },
          "autoextend": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VMAutoextendIn"
              },
              {
                "type": "null"
              }
            ],
            "description": "Grow the root disk and its filesystem before it fills up"
          },
          "user_data": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Data",
            "description": "cloud-init user data: #cloud-config or a script starting with #!, up to 64 KB. Runs once at first boot, after the platform's own setup"
          }
        },
        "type": "object",
        "required": [
          "vm_class_id",
          "storage_class_id",
          "network_uuid",
          "disk_gb"
        ],
        "title": "VMCreate",
        "description": "Request to create VM.\n\nTwo source kinds, mutually exclusive:\n- OS template: set vm_template_id (cloud-init, auto creds, boots from disk).\n- Custom ISO:  set iso_slug (no cloud-init, installer runs from the ISO,\n  access via VNC console, boots from the ISO)."
      },
      "VMDiskChangeClassRequest": {
        "properties": {
          "storage_class_id": {
            "type": "integer",
            "title": "Storage Class Id",
            "description": "The new disk id, from List disks"
          }
        },
        "type": "object",
        "required": [
          "storage_class_id"
        ],
        "title": "VMDiskChangeClassRequest",
        "description": "Switch the VM root disk between storage classes (throttle limits only).\nAll classes share one Vitastor pool, so this is a live op."
      },
      "VMDiskResizeRequest": {
        "properties": {
          "new_size_gb": {
            "type": "integer",
            "maximum": 10000,
            "minimum": 1,
            "title": "New Size Gb",
            "description": "New root disk size, GB; bigger than now"
          }
        },
        "type": "object",
        "required": [
          "new_size_gb"
        ],
        "title": "VMDiskResizeRequest",
        "description": "Grow the VM root disk. Shrink is not supported (Vitastor)."
      },
      "VMPowerRequest": {
        "properties": {
          "action": {
            "type": "string",
            "title": "Action",
            "description": "start, shutdown (clean), destroy (power off), reboot (clean) or reset (hard)",
            "examples": [
              "start",
              "shutdown",
              "reboot"
            ]
          }
        },
        "type": "object",
        "required": [
          "action"
        ],
        "title": "VMPowerRequest",
        "description": "Request to control VM power state."
      },
      "VMPtrUpdate": {
        "properties": {
          "hostname": {
            "type": "string",
            "title": "Hostname",
            "description": "Name the public addresses resolve back to, a full domain name"
          }
        },
        "type": "object",
        "required": [
          "hostname"
        ],
        "title": "VMPtrUpdate"
      },
      "VMReinstallRequest": {
        "properties": {
          "vm_template_id": {
            "type": "integer",
            "title": "Vm Template Id",
            "description": "Image id, from List images; the same system or another one"
          }
        },
        "type": "object",
        "required": [
          "vm_template_id"
        ],
        "title": "VMReinstallRequest",
        "description": "Request to reinstall a VM's root disk from a template."
      },
      "VMResizeRequest": {
        "properties": {
          "vm_class_id": {
            "type": "integer",
            "title": "Vm Class Id",
            "description": "The new plan, from List plans, on the same hardware"
          }
        },
        "type": "object",
        "required": [
          "vm_class_id"
        ],
        "title": "VMResizeRequest",
        "description": "Request to resize VM (change vm_class)."
      },
      "VMUpdateRequest": {
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name",
            "description": "New name of the server"
          },
          "tags": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags",
            "description": "Your tags; replace all the tags it had, up to 10",
            "examples": [
              {
                "env": "production",
                "team": "backend"
              }
            ]
          }
        },
        "type": "object",
        "title": "VMUpdateRequest",
        "description": "Request to update VM properties."
      },
      "Vm": {
        "properties": {
          "vm_uuid": {
            "description": "Server id",
            "title": "Vm Uuid",
            "type": "string"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Name given at create",
            "title": "Display Name"
          },
          "vm_name": {
            "description": "System name, also the DNS name of the server",
            "title": "Vm Name",
            "type": "string"
          },
          "status": {
            "description": "pending while it is created, then active; deleting, reinstalling and resizing while those run; failed or error when something went wrong",
            "title": "Status",
            "type": "string"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Power state: running, stopped and the like",
            "title": "State"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "What went wrong, when status is failed or error",
            "title": "Error"
          },
          "pending_op": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "A power action still running, for example {\"type\": \"vm_power\", \"action\": \"shutdown\"}; null when none is",
            "title": "Pending Op"
          },
          "vm_class_id": {
            "description": "Plan id",
            "title": "Vm Class Id",
            "type": "integer"
          },
          "vm_class_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Plan name",
            "title": "Vm Class Name"
          },
          "cpu_cores": {
            "description": "vCPU cores",
            "title": "Cpu Cores",
            "type": "integer"
          },
          "memory_mb": {
            "description": "Memory, MB",
            "title": "Memory Mb",
            "type": "integer"
          },
          "storage_class_id": {
            "description": "Disk id of the root disk",
            "title": "Storage Class Id",
            "type": "integer"
          },
          "storage_class_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Disk name of the root disk",
            "title": "Storage Class Name"
          },
          "disk_gb": {
            "description": "Root disk size, GB",
            "title": "Disk Gb",
            "type": "integer"
          },
          "vm_template_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Image the server was created with",
            "title": "Vm Template Id"
          },
          "os_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "System of the image",
            "title": "Os Type"
          },
          "ssh_key_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "SSH key of the scamp user",
            "title": "Ssh Key Id"
          },
          "network_uuid": {
            "description": "Private network of the server",
            "title": "Network Uuid",
            "type": "string"
          },
          "network": {
            "$ref": "#/components/schemas/VmNetworkInfo"
          },
          "os_user": {
            "description": "User to log in as: scamp, with sudo",
            "title": "Os User",
            "type": "string"
          },
          "os_password": {
            "description": "Password of that user",
            "title": "Os Password",
            "type": "string"
          },
          "tags": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Your tags",
            "title": "Tags",
            "type": "object"
          },
          "created_at": {
            "description": "When it was created, ISO 8601",
            "title": "Created At",
            "type": "string"
          }
        },
        "required": [
          "vm_uuid",
          "vm_name",
          "status",
          "vm_class_id",
          "cpu_cores",
          "memory_mb",
          "storage_class_id",
          "disk_gb",
          "network_uuid",
          "network",
          "os_user",
          "os_password",
          "tags",
          "created_at"
        ],
        "title": "Vm",
        "type": "object"
      },
      "VmCreated": {
        "properties": {
          "vm_uuid": {
            "description": "Server id",
            "title": "Vm Uuid",
            "type": "string"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The name you gave",
            "title": "Display Name"
          },
          "status": {
            "description": "Always queued: poll Get a VM until status is active",
            "title": "Status",
            "type": "string"
          },
          "os_user": {
            "description": "User to log in as: scamp, with sudo",
            "title": "Os User",
            "type": "string"
          },
          "os_password": {
            "description": "Its password, yours or generated",
            "title": "Os Password",
            "type": "string"
          }
        },
        "required": [
          "vm_uuid",
          "status",
          "os_user",
          "os_password"
        ],
        "title": "VmCreated",
        "type": "object"
      },
      "VmDisk": {
        "properties": {
          "id": {
            "description": "Disk id, for storage_class_id in Create a VM and Change the disk",
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "description": "standard, enterprise, standard-dedicated or enterprise-dedicated",
            "title": "Name",
            "type": "string"
          },
          "dedicated": {
            "description": "Keeps its full performance when the storage cluster runs short",
            "title": "Dedicated",
            "type": "boolean"
          },
          "read_iops_limit": {
            "description": "Read operations a second, at most",
            "title": "Read Iops Limit",
            "type": "integer"
          },
          "write_iops_limit": {
            "description": "Write operations a second, at most",
            "title": "Write Iops Limit",
            "type": "integer"
          },
          "read_bandwidth_limit": {
            "description": "Read throughput, MB/s, at most",
            "title": "Read Bandwidth Limit",
            "type": "integer"
          },
          "write_bandwidth_limit": {
            "description": "Write throughput, MB/s, at most",
            "title": "Write Bandwidth Limit",
            "type": "integer"
          },
          "min_size_gb": {
            "description": "Smallest disk, GB",
            "title": "Min Size Gb",
            "type": "integer"
          },
          "max_size_gb": {
            "description": "Largest disk, GB",
            "title": "Max Size Gb",
            "type": "integer"
          },
          "free_size_gb": {
            "description": "GB of a root disk that are free; 25 on standard, 0 on the others",
            "title": "Free Size Gb",
            "type": "integer"
          },
          "price_per_gb_hour_millicents": {
            "description": "Price of a GB an hour in millicents: 10,000 make 1 EUR",
            "title": "Price Per Gb Hour Millicents",
            "type": "number"
          },
          "line": {
            "description": "v2 for the disks on sale",
            "enum": [
              "legacy",
              "v2"
            ],
            "title": "Line",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "dedicated",
          "read_iops_limit",
          "write_iops_limit",
          "read_bandwidth_limit",
          "write_bandwidth_limit",
          "min_size_gb",
          "max_size_gb",
          "free_size_gb",
          "price_per_gb_hour_millicents",
          "line"
        ],
        "title": "VmDisk",
        "type": "object"
      },
      "VmDiskList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/VmDisk"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "title": "VmDiskList",
        "type": "object"
      },
      "VmDiskOp": {
        "properties": {
          "vm_uuid": {
            "title": "Vm Uuid",
            "type": "string"
          },
          "status": {
            "description": "queued: the change runs in the background while the server runs",
            "title": "Status",
            "type": "string"
          },
          "disk_gb": {
            "description": "Root disk size after the change, GB",
            "title": "Disk Gb",
            "type": "integer"
          },
          "storage_class_id": {
            "description": "Disk id after the change",
            "title": "Storage Class Id",
            "type": "integer"
          }
        },
        "required": [
          "vm_uuid",
          "status",
          "disk_gb",
          "storage_class_id"
        ],
        "title": "VmDiskOp",
        "type": "object"
      },
      "VmDone": {
        "properties": {
          "success": {
            "title": "Success",
            "type": "boolean"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "title": "VmDone",
        "type": "object"
      },
      "VmError": {
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {},
                "type": "array"
              }
            ],
            "description": "What went wrong, in words to show a person; on 422 a list, one entry for each field that is not right",
            "title": "Detail"
          }
        },
        "required": [
          "detail"
        ],
        "title": "VmError",
        "type": "object"
      },
      "VmImage": {
        "properties": {
          "id": {
            "description": "Image id, for vm_template_id in Create a VM and Reinstall",
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "description": "Name, for example Ubuntu 26.04 LTS",
            "title": "Name",
            "type": "string"
          },
          "os_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Ubuntu, Debian, Rocky and so on",
            "title": "Os Type"
          },
          "os_family": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Linux",
            "title": "Os Family"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Version of the system",
            "title": "Version"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "VmImage",
        "type": "object"
      },
      "VmImageList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/VmImage"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "title": "VmImageList",
        "type": "object"
      },
      "VmList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Vm"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "title": "VmList",
        "type": "object"
      },
      "VmMetrics": {
        "properties": {
          "vm_uuid": {
            "title": "Vm Uuid",
            "type": "string"
          },
          "window": {
            "description": "The window asked for",
            "title": "Window",
            "type": "string"
          },
          "resolution_seconds": {
            "description": "Seconds each point averages",
            "title": "Resolution Seconds",
            "type": "integer"
          },
          "current": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VmMetricsPoint"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The latest reading"
          },
          "points": {
            "description": "From the host side, oldest first",
            "items": {
              "$ref": "#/components/schemas/VmMetricsPoint"
            },
            "title": "Points",
            "type": "array"
          }
        },
        "required": [
          "vm_uuid",
          "window",
          "resolution_seconds",
          "points"
        ],
        "title": "VmMetrics",
        "type": "object"
      },
      "VmMetricsPoint": {
        "properties": {
          "ts": {
            "description": "Unix time of the point",
            "title": "Ts",
            "type": "integer"
          },
          "cpu_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "CPU in use, percent of all the server's vCPUs",
            "title": "Cpu Pct"
          },
          "disk_rd_iops": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Disk reads a second",
            "title": "Disk Rd Iops"
          },
          "disk_wr_iops": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Disk writes a second",
            "title": "Disk Wr Iops"
          },
          "disk_rd_bps": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Disk reads, bytes a second",
            "title": "Disk Rd Bps"
          },
          "disk_wr_bps": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Disk writes, bytes a second",
            "title": "Disk Wr Bps"
          },
          "rx_bps": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Traffic into the server, bytes a second",
            "title": "Rx Bps"
          },
          "tx_bps": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Traffic out of the server, bytes a second",
            "title": "Tx Bps"
          }
        },
        "required": [
          "ts"
        ],
        "title": "VmMetricsPoint",
        "type": "object"
      },
      "VmNetworkInfo": {
        "properties": {
          "network_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Private network of the server",
            "title": "Network Uuid"
          },
          "ip_internal": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Private IPv4 address in that network",
            "title": "Ip Internal"
          },
          "ipv6_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "IPv6 address",
            "title": "Ipv6 Address"
          },
          "public_ip_v4": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Public IPv4 address of the server, if it has one",
            "title": "Public Ip V4"
          },
          "public_ip_v6": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Public IPv6 address of the server, if it has one",
            "title": "Public Ip V6"
          },
          "floating_ip_v4": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Floating IPv4 attached to the server",
            "title": "Floating Ip V4"
          },
          "floating_ip_v6": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Floating IPv6 attached to the server",
            "title": "Floating Ip V6"
          }
        },
        "title": "VmNetworkInfo",
        "type": "object"
      },
      "VmPlan": {
        "properties": {
          "id": {
            "description": "Plan id, for vm_class_id in Create a VM and Change the plan",
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "description": "Plan name, for example basic-4g or hf-4g-dedicated",
            "title": "Name",
            "type": "string"
          },
          "cpu_cores": {
            "description": "vCPU cores",
            "title": "Cpu Cores",
            "type": "integer"
          },
          "memory_mb": {
            "description": "Memory, MB",
            "title": "Memory Mb",
            "type": "integer"
          },
          "cpu_mode": {
            "description": "burst for a shared plan, dedicated for a -dedicated one",
            "enum": [
              "burst",
              "dedicated"
            ],
            "title": "Cpu Mode",
            "type": "string"
          },
          "cpu_min_usage": {
            "description": "Guaranteed CPU share of a shared plan, percent; 100 on a dedicated one",
            "title": "Cpu Min Usage",
            "type": "integer"
          },
          "price_per_hour_millicents": {
            "description": "Price an hour in millicents: 10,000 make 1 EUR. A month is 720 hours",
            "title": "Price Per Hour Millicents",
            "type": "number"
          },
          "hardware_class_id": {
            "description": "Hardware the plan runs on",
            "title": "Hardware Class Id",
            "type": "integer"
          },
          "hardware_class_slug": {
            "description": "legacy for Basic (Intel Xeon), scalpel for High Frequency (AMD EPYC)",
            "title": "Hardware Class Slug",
            "type": "string"
          },
          "hardware_class_name": {
            "description": "Hardware name",
            "title": "Hardware Class Name",
            "type": "string"
          },
          "line": {
            "description": "v2 for the plans on sale, legacy for the plans sold before November 2026",
            "enum": [
              "legacy",
              "v2"
            ],
            "title": "Line",
            "type": "string"
          },
          "locked": {
            "description": "Above what the account may create now; a top-up or a limit request opens it",
            "title": "Locked",
            "type": "boolean"
          },
          "sold_out": {
            "description": "No free capacity for this plan right now; a create gets 409",
            "title": "Sold Out",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "cpu_cores",
          "memory_mb",
          "cpu_mode",
          "cpu_min_usage",
          "price_per_hour_millicents",
          "hardware_class_id",
          "hardware_class_slug",
          "hardware_class_name",
          "line",
          "locked",
          "sold_out"
        ],
        "title": "VmPlan",
        "type": "object"
      },
      "VmPlanList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/VmPlan"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "title": "VmPlanList",
        "type": "object"
      },
      "VmPowerQueued": {
        "properties": {
          "vm_uuid": {
            "title": "Vm Uuid",
            "type": "string"
          },
          "action": {
            "description": "The action sent to the server",
            "title": "Action",
            "type": "string"
          },
          "status": {
            "description": "power_control_queued: watch state in Get a VM",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "vm_uuid",
          "action",
          "status"
        ],
        "title": "VmPowerQueued",
        "type": "object"
      },
      "VmPtr": {
        "properties": {
          "vm_uuid": {
            "title": "Vm Uuid",
            "type": "string"
          },
          "hostname": {
            "description": "Reverse DNS name of the public addresses now",
            "title": "Hostname",
            "type": "string"
          }
        },
        "required": [
          "vm_uuid",
          "hostname"
        ],
        "title": "VmPtr",
        "type": "object"
      },
      "VmPublicIp": {
        "properties": {
          "public_ip_v4": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Public IPv4 address; null after a release",
            "title": "Public Ip V4"
          },
          "public_ip_v6": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Public IPv6 address; null after a release",
            "title": "Public Ip V6"
          }
        },
        "title": "VmPublicIp",
        "type": "object"
      },
      "VmReinstallJob": {
        "properties": {
          "vm_uuid": {
            "title": "Vm Uuid",
            "type": "string"
          },
          "from_template_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "System before",
            "title": "From Template Name"
          },
          "to_template_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "System after",
            "title": "To Template Name"
          },
          "step": {
            "description": "queued, applying, done or failed",
            "title": "Step",
            "type": "string"
          },
          "started_at": {
            "title": "Started At",
            "type": "string"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Completed At"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "What went wrong, when step is failed",
            "title": "Error"
          }
        },
        "required": [
          "vm_uuid",
          "step",
          "started_at"
        ],
        "title": "VmReinstallJob",
        "type": "object"
      },
      "VmResizeJob": {
        "properties": {
          "vm_uuid": {
            "title": "Vm Uuid",
            "type": "string"
          },
          "from_class_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Plan before",
            "title": "From Class Name"
          },
          "to_class_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Plan after",
            "title": "To Class Name"
          },
          "needs_restart": {
            "description": "The server restarts: the vCPU or memory change. Shared to dedicated of the same size does not restart it",
            "title": "Needs Restart",
            "type": "boolean"
          },
          "step": {
            "description": "queued, applying, done or failed",
            "title": "Step",
            "type": "string"
          },
          "started_at": {
            "title": "Started At",
            "type": "string"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Completed At"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "What went wrong, when step is failed",
            "title": "Error"
          }
        },
        "required": [
          "vm_uuid",
          "needs_restart",
          "step",
          "started_at"
        ],
        "title": "VmResizeJob",
        "type": "object"
      }
    },
    "securitySchemes": {
      "token": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API token: sc_ and 40 characters"
      }
    }
  },
  "security": [
    {
      "token": []
    }
  ]
}