{
  "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": "plans",
      "x-displayName": "Plans and images"
    },
    {
      "name": "servers",
      "x-displayName": "Servers"
    },
    {
      "name": "power",
      "x-displayName": "Power"
    },
    {
      "name": "backups",
      "x-displayName": "Backups"
    },
    {
      "name": "rebuild",
      "x-displayName": "Reinstall and resize"
    },
    {
      "name": "network",
      "x-displayName": "Reverse DNS"
    },
    {
      "name": "metrics",
      "x-displayName": "Metrics"
    },
    {
      "name": "ssh-keys",
      "x-displayName": "SSH keys"
    }
  ],
  "paths": {
    "/api/v1/vps/plans": {
      "get": {
        "operationId": "list-plans",
        "summary": "List plans",
        "description": "The plans on sale. Their ids go into Create a VPS and Change the plan.",
        "tags": [
          "plans"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsPlanList"
                },
                "example": {
                  "items": [
                    {
                      "id": "vps2-1",
                      "name": "VPS 1",
                      "vcpu": 1,
                      "cpu_limit": null,
                      "ram_gb": 1,
                      "disk_gb": 20,
                      "traffic_gb": 1000,
                      "net_mbit": 1000,
                      "disk_iops": 10000,
                      "disk_mbps": 250,
                      "price_monthly": 1.5,
                      "backup_share": 0.2
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "plans",
        "x-order": 0
      }
    },
    "/api/v1/vps/stock": {
      "get": {
        "operationId": "stock",
        "summary": "Plans in stock",
        "description": "VPS runs on capacity we have free, so a plan can sell out for a while. A create with a plan that is out gets 409.",
        "tags": [
          "plans"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsStock"
                },
                "example": {
                  "items": {
                    "vps2-075": "in",
                    "vps2-1": "in",
                    "vps2-16": "low",
                    "vps2-32": "out"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "plans",
        "x-order": 1
      }
    },
    "/api/v1/vps/images": {
      "get": {
        "operationId": "list-images",
        "summary": "List images",
        "description": "The systems a VPS can be created or reinstalled with.",
        "tags": [
          "plans"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsImageList"
                },
                "example": {
                  "items": [
                    {
                      "id": "ubuntu-26.04",
                      "os": "Ubuntu",
                      "version": "26.04 LTS"
                    },
                    {
                      "id": "debian-13",
                      "os": "Debian",
                      "version": "13"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "plans",
        "x-order": 2
      }
    },
    "/api/v1/vps": {
      "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/VpsCreateRequest"
              },
              "example": {
                "name": "web-1",
                "plan_id": "vps2-1",
                "image": "ubuntu-26.04",
                "ssh_key_ids": [
                  42
                ]
              },
              "examples": {
                "e0": {
                  "summary": "One SSH key",
                  "value": {
                    "name": "web-1",
                    "plan_id": "vps2-1",
                    "image": "ubuntu-26.04",
                    "ssh_key_ids": [
                      42
                    ]
                  }
                },
                "e1": {
                  "summary": "Two SSH keys and daily backups",
                  "value": {
                    "name": "db-1",
                    "plan_id": "vps2-4",
                    "image": "debian-13",
                    "ssh_key_ids": [
                      42,
                      57
                    ],
                    "backups": true
                  }
                },
                "e2": {
                  "summary": "A root password, no key",
                  "value": {
                    "name": "test-1",
                    "plan_id": "vps2-075",
                    "image": "rocky-10",
                    "password": "change-me-to-a-long-one"
                  }
                },
                "e3": {
                  "summary": "A key and a root password",
                  "value": {
                    "name": "web-2",
                    "plan_id": "vps2-1",
                    "image": "almalinux-10",
                    "ssh_key_ids": [
                      42
                    ],
                    "password": "change-me-to-a-long-one"
                  }
                },
                "e4": {
                  "summary": "Safe to retry",
                  "value": {
                    "name": "web-1",
                    "plan_id": "vps2-1",
                    "image": "ubuntu-26.04",
                    "ssh_key_ids": [
                      42
                    ]
                  },
                  "x-headers": {
                    "Idempotency-Key": "web-1-2026-10-23"
                  },
                  "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 VPS",
        "description": "Creates a server and starts it, usually in about a minute; poll Get a VPS until its status is running. The hostname, DNS name and reverse DNS are made from the name with a random suffix, for example web-1-a1b2c3.vm.scamp.pro. Give ssh_key_ids, a root password, or both. The balance has to cover the first month of the plan; 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/VpsCreated"
                },
                "example": {
                  "vps_uuid": "12d46f8c-d66e-4163-99aa-1245d5b06e5b",
                  "status": "queued",
                  "hostname": "web-1-a1b2c3.vm.scamp.pro",
                  "ipv4": "185.236.9.61",
                  "ipv6_prefix": "2a01:ea05:0:f00::/56"
                }
              }
            }
          },
          "400": {
            "description": "A name, image, plan or password that is not accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "402": {
            "description": "The balance does not cover the first month",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "403": {
            "description": "The VPS limit of the account is reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "409": {
            "description": "The plan is out of stock",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "servers",
        "x-order": 103,
        "x-wait": "running"
      },
      "get": {
        "operationId": "list",
        "summary": "List VPS",
        "description": "Every VPS of the account, newest first.",
        "tags": [
          "servers"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsList"
                },
                "example": {
                  "items": [
                    {
                      "vps_uuid": "12d46f8c-d66e-4163-99aa-1245d5b06e5b",
                      "name": "web-1",
                      "plan_id": "vps2-1",
                      "plan_name": "VPS 1",
                      "image": "ubuntu-26.04",
                      "backups": true,
                      "status": "running",
                      "ipv4": "185.236.9.61",
                      "ipv6_prefix": "2a01:ea05:0:f00::/56",
                      "ptr": "web-1-a1b2c3.vm.scamp.pro",
                      "ptr_custom": false,
                      "cpu_model": "Intel Xeon Gold 6154",
                      "disk": "NVMe",
                      "error": null,
                      "created_at": "2026-10-23T08:12:40+00:00",
                      "net_capped": false,
                      "traffic": {
                        "month": "2026-10",
                        "out_bytes": 1830000000,
                        "in_bytes": 920000000
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "servers",
        "x-order": 104
      }
    },
    "/api/v1/vps/{vps_uuid}": {
      "get": {
        "parameters": [
          {
            "name": "vps_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vps Uuid"
            }
          }
        ],
        "operationId": "get",
        "summary": "Get a VPS",
        "description": "One VPS with its status, addresses and this month's traffic.",
        "tags": [
          "servers"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Vps"
                },
                "example": {
                  "vps_uuid": "12d46f8c-d66e-4163-99aa-1245d5b06e5b",
                  "name": "web-1",
                  "plan_id": "vps2-1",
                  "plan_name": "VPS 1",
                  "image": "ubuntu-26.04",
                  "backups": true,
                  "status": "running",
                  "ipv4": "185.236.9.61",
                  "ipv6_prefix": "2a01:ea05:0:f00::/56",
                  "ptr": "web-1-a1b2c3.vm.scamp.pro",
                  "ptr_custom": false,
                  "cpu_model": "Intel Xeon Gold 6154",
                  "disk": "NVMe",
                  "error": null,
                  "created_at": "2026-10-23T08:12:40+00:00",
                  "net_capped": false,
                  "traffic": {
                    "month": "2026-10",
                    "out_bytes": 1830000000,
                    "in_bytes": 920000000
                  }
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "404": {
            "description": "No such VPS in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "servers",
        "x-order": 105
      },
      "delete": {
        "parameters": [
          {
            "name": "vps_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vps Uuid"
            }
          }
        ],
        "operationId": "delete",
        "summary": "Delete a VPS",
        "description": "Deletes the server, its disk and its backups. Billing stops at once, and from then on Get a VPS answers 404 while the host removes the server in the background.",
        "tags": [
          "servers"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsTaskStarted"
                },
                "example": {
                  "vps_uuid": "12d46f8c-d66e-4163-99aa-1245d5b06e5b",
                  "status": "deleting"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "404": {
            "description": "No such VPS in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "409": {
            "description": "The server is busy with another task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "servers",
        "x-order": 106,
        "x-wait": "gone"
      }
    },
    "/api/v1/vps/summary": {
      "get": {
        "operationId": "summary",
        "summary": "Account summary",
        "description": "What all your VPS cost together and how long the balance lasts at that rate.",
        "tags": [
          "servers"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsSummary"
                },
                "example": {
                  "paid_balance_eur": 42.5,
                  "runway_days": 283,
                  "hourly_eur": 0.0063,
                  "monthly_eur": 4.5,
                  "backups_on": 1,
                  "vcpu": 3,
                  "ram_gb": 3,
                  "disk_gb": 60
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "servers",
        "x-order": 107
      }
    },
    "/api/v1/vps/{vps_uuid}/action": {
      "post": {
        "parameters": [
          {
            "name": "vps_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vps Uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VpsActionRequest"
              },
              "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 at once",
                  "value": {
                    "action": "stop"
                  }
                },
                "e4": {
                  "summary": "Restart at once",
                  "value": {
                    "action": "reset"
                  }
                }
              }
            }
          }
        },
        "operationId": "power",
        "summary": "Start, stop, reboot",
        "description": "start boots a stopped server. shutdown asks the system to stop and stop powers it off at once. reboot asks the system to restart and reset restarts it at once. In the first minute after a create or a reinstall the system is still setting itself up and may not take a shutdown or a reboot; send it again a little later, or use stop or reset.",
        "tags": [
          "power"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsActionDone"
                },
                "example": {
                  "vps_uuid": "12d46f8c-d66e-4163-99aa-1245d5b06e5b",
                  "action": "reboot"
                }
              }
            }
          },
          "400": {
            "description": "Not one of the five actions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "402": {
            "description": "Starting needs a day of the plan on the balance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "409": {
            "description": "The server is busy with another task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "power",
        "x-order": 208,
        "x-wait": "power"
      }
    },
    "/api/v1/vps/{vps_uuid}/backups": {
      "get": {
        "parameters": [
          {
            "name": "vps_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vps Uuid"
            }
          }
        ],
        "operationId": "list-backups",
        "summary": "List backups",
        "description": "The backups of a VPS, newest first, with the next daily start and the backup or restore running now.",
        "tags": [
          "backups"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsBackups"
                },
                "example": {
                  "enabled": true,
                  "keep": 5,
                  "schedule": "03:17",
                  "next": 1792628220,
                  "job": {
                    "kind": "backup",
                    "started": 1792656120,
                    "pct": 45
                  },
                  "items": [
                    {
                      "id": "bk-3f9a1c0d2e4b5a69",
                      "created": 1792541820,
                      "size": 1287651328,
                      "manual": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "backups",
        "x-order": 309
      },
      "post": {
        "parameters": [
          {
            "name": "vps_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vps Uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VpsBackupsRequest"
              },
              "example": {
                "enabled": true
              },
              "examples": {
                "e0": {
                  "summary": "Turn on",
                  "value": {
                    "enabled": true
                  }
                },
                "e1": {
                  "summary": "Turn off and delete every backup",
                  "value": {
                    "enabled": false
                  }
                }
              }
            }
          }
        },
        "operationId": "toggle-backups",
        "summary": "Backups on or off",
        "description": "On, a backup is taken every night at a time of the server's own and the last 5 are kept; the plan price grows by its backup share. Off deletes every backup of the server.",
        "tags": [
          "backups"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsBackupsToggled"
                },
                "example": {
                  "vps_uuid": "12d46f8c-d66e-4163-99aa-1245d5b06e5b",
                  "enabled": true
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "409": {
            "description": "A backup is running; turn backups off when it is done",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "backups",
        "x-order": 310
      }
    },
    "/api/v1/vps/{vps_uuid}/backup": {
      "post": {
        "parameters": [
          {
            "name": "vps_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vps Uuid"
            }
          }
        ],
        "operationId": "backup-now",
        "summary": "Back up now",
        "description": "Takes a backup now. One runs at a time and three a day; manual ones count toward the 5 kept.",
        "tags": [
          "backups"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsTaskStarted"
                },
                "example": {
                  "vps_uuid": "12d46f8c-d66e-4163-99aa-1245d5b06e5b",
                  "status": "backing_up"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "409": {
            "description": "Backups are off, or a backup is already running",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "429": {
            "description": "Three manual backups in the last 24 hours",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "backups",
        "x-order": 311
      }
    },
    "/api/v1/vps/{vps_uuid}/restore": {
      "post": {
        "parameters": [
          {
            "name": "vps_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vps Uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VpsRestoreRequest"
              },
              "example": {
                "backup_id": "bk-3f9a1c0d2e4b5a69"
              },
              "examples": {
                "e0": {
                  "summary": "Restore",
                  "value": {
                    "backup_id": "bk-3f9a1c0d2e4b5a69"
                  }
                }
              }
            }
          }
        },
        "operationId": "restore",
        "summary": "Restore a backup",
        "description": "Puts the whole disk back from a backup and starts the server.",
        "tags": [
          "backups"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsTaskStarted"
                },
                "example": {
                  "vps_uuid": "12d46f8c-d66e-4163-99aa-1245d5b06e5b",
                  "status": "restoring"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "404": {
            "description": "No such backup of this VPS",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "409": {
            "description": "The server is busy with another task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "backups",
        "x-order": 312,
        "x-wait": "running"
      }
    },
    "/api/v1/vps/{vps_uuid}/backups/delete": {
      "post": {
        "parameters": [
          {
            "name": "vps_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vps Uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VpsBackupDeleteRequest"
              },
              "example": {
                "backup_id": "bk-3f9a1c0d2e4b5a69"
              },
              "examples": {
                "e0": {
                  "summary": "Delete",
                  "value": {
                    "backup_id": "bk-3f9a1c0d2e4b5a69"
                  }
                }
              }
            }
          }
        },
        "operationId": "delete-backup",
        "summary": "Delete a backup",
        "description": "Deletes one backup.",
        "tags": [
          "backups"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsBackupDeleted"
                },
                "example": {
                  "vps_uuid": "12d46f8c-d66e-4163-99aa-1245d5b06e5b",
                  "deleted": "bk-3f9a1c0d2e4b5a69"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "404": {
            "description": "No such backup of this VPS",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "backups",
        "x-order": 313
      }
    },
    "/api/v1/vps/{vps_uuid}/reinstall": {
      "post": {
        "parameters": [
          {
            "name": "vps_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vps Uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VpsReinstallRequest"
              },
              "example": {
                "image": "debian-13",
                "ssh_key_ids": [
                  42
                ]
              },
              "examples": {
                "e0": {
                  "summary": "With an SSH key",
                  "value": {
                    "image": "debian-13",
                    "ssh_key_ids": [
                      42
                    ]
                  }
                },
                "e1": {
                  "summary": "With a root password",
                  "value": {
                    "image": "ubuntu-26.04",
                    "password": "change-me-to-a-long-one"
                  }
                }
              }
            }
          }
        },
        "operationId": "reinstall",
        "summary": "Reinstall",
        "description": "A fresh disk with the image you give. The addresses, names and backups stay.",
        "tags": [
          "rebuild"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsTaskStarted"
                },
                "example": {
                  "vps_uuid": "12d46f8c-d66e-4163-99aa-1245d5b06e5b",
                  "status": "reinstalling"
                }
              }
            }
          },
          "400": {
            "description": "An image or password that is not accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "409": {
            "description": "The server is busy with another task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "rebuild",
        "x-order": 414,
        "x-wait": "running"
      }
    },
    "/api/v1/vps/{vps_uuid}/plan": {
      "post": {
        "parameters": [
          {
            "name": "vps_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vps Uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VpsPlanRequest"
              },
              "example": {
                "plan_id": "vps2-2"
              },
              "examples": {
                "e0": {
                  "summary": "Move to VPS 2",
                  "value": {
                    "plan_id": "vps2-2"
                  }
                }
              }
            }
          }
        },
        "operationId": "change-plan",
        "summary": "Change the plan",
        "description": "Moves the server to a bigger plan: more memory and at least the same disk, which grows and cannot shrink. The server restarts to pick it up, and the new price applies from the next hour.",
        "tags": [
          "rebuild"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsPlanChanged"
                },
                "example": {
                  "vps_uuid": "12d46f8c-d66e-4163-99aa-1245d5b06e5b",
                  "plan_id": "vps2-2",
                  "rebooted": true
                }
              }
            }
          },
          "400": {
            "description": "Not a bigger plan",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "402": {
            "description": "The balance does not cover the new plan",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "409": {
            "description": "The plan is out of stock",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "rebuild",
        "x-order": 415,
        "x-wait": "running"
      }
    },
    "/api/v1/vps/{vps_uuid}/ptr": {
      "post": {
        "parameters": [
          {
            "name": "vps_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vps Uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VpsPtrRequest"
              },
              "example": {
                "hostname": "mail.example.com"
              },
              "examples": {
                "e0": {
                  "summary": "Set a name",
                  "value": {
                    "hostname": "mail.example.com"
                  }
                },
                "e1": {
                  "summary": "Back to the default name",
                  "value": {
                    "hostname": ""
                  }
                }
              }
            }
          }
        },
        "operationId": "reverse-dns",
        "summary": "Set reverse DNS",
        "description": "Sets the reverse DNS of the IPv4 address and of the first IPv6 address. An empty hostname goes back to the default name. Names under our own domains are not accepted.",
        "tags": [
          "network"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsPtr"
                },
                "example": {
                  "vps_uuid": "12d46f8c-d66e-4163-99aa-1245d5b06e5b",
                  "ptr": "mail.example.com",
                  "custom": true
                }
              }
            }
          },
          "400": {
            "description": "Not a hostname, or a name under our domains",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "network",
        "x-order": 516
      }
    },
    "/api/v1/vps/{vps_uuid}/metrics": {
      "get": {
        "parameters": [
          {
            "name": "vps_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vps Uuid"
            }
          },
          {
            "name": "timeframe",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "hour",
              "title": "Timeframe"
            }
          }
        ],
        "operationId": "metrics",
        "summary": "Get metrics",
        "description": "CPU, memory, network, disk and pressure from the host side, averaged over each point, for the last hour, day or week. A new server has no history before it was created.",
        "tags": [
          "metrics"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsMetrics"
                },
                "example": {
                  "timeframe": "hour",
                  "points": [
                    {
                      "t": 1792656000,
                      "cpu": 0.0312,
                      "mem": 412311552,
                      "maxmem": 805306368,
                      "netin": 1843.2,
                      "netout": 9216.5,
                      "diskread": 0,
                      "diskwrite": 40960,
                      "pressurecpusome": 0.41,
                      "pressurecpufull": 0,
                      "pressurememorysome": 0,
                      "pressurememoryfull": 0,
                      "pressureiosome": 0.12,
                      "pressureiofull": 0.05
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "timeframe is not hour, day or week",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "metrics",
        "x-order": 617
      }
    },
    "/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_ids of Create a VPS and Reinstall.",
        "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/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "ssh-keys",
        "x-order": 718
      }
    },
    "/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/VpsError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "409": {
            "description": "The key is already in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "ssh-keys",
        "x-order": 719
      }
    },
    "/api/v1/ssh-keys/{key_id}": {
      "get": {
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Key Id"
            }
          }
        ],
        "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/VpsError"
                }
              }
            }
          },
          "404": {
            "description": "No such key in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "ssh-keys",
        "x-order": 720
      },
      "delete": {
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Key Id"
            }
          }
        ],
        "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/VpsError"
                }
              }
            }
          },
          "404": {
            "description": "No such key in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsError"
                }
              }
            }
          }
        },
        "x-group": "ssh-keys",
        "x-order": 721
      }
    }
  },
  "components": {
    "schemas": {
      "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"
      },
      "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."
      },
      "Vps": {
        "properties": {
          "vps_uuid": {
            "description": "VPS id",
            "title": "Vps Uuid",
            "type": "string"
          },
          "name": {
            "description": "Name given at create",
            "title": "Name",
            "type": "string"
          },
          "plan_id": {
            "description": "Plan id",
            "title": "Plan Id",
            "type": "string"
          },
          "plan_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Plan name",
            "title": "Plan Name"
          },
          "plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VpsPlan"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The plan, also when it is no longer on sale"
          },
          "image": {
            "description": "Image id of the installed system",
            "title": "Image",
            "type": "string"
          },
          "backups": {
            "description": "Daily backups on",
            "title": "Backups",
            "type": "boolean"
          },
          "status": {
            "description": "queued, cloning, configuring, starting, running, stopped, restoring, reinstalling, deleting, unpaid (stopped when the balance ran out) or error",
            "title": "Status",
            "type": "string"
          },
          "ipv4": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Public IPv4 address",
            "title": "Ipv4"
          },
          "ipv6_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "IPv6 /56 of the server; its first address is ::1",
            "title": "Ipv6 Prefix"
          },
          "ptr": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Reverse DNS name of the addresses",
            "title": "Ptr"
          },
          "ptr_custom": {
            "description": "Reverse DNS was set by you, not the default name",
            "title": "Ptr Custom",
            "type": "boolean"
          },
          "cpu_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "CPU model of the host",
            "title": "Cpu Model"
          },
          "disk": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Disk type of the host: NVMe or SSD",
            "title": "Disk"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "What went wrong, when status is error",
            "title": "Error"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "When it was created, ISO 8601",
            "title": "Created At"
          },
          "net_capped": {
            "description": "The port is at 100 Mbit/s until the next month: the quota is used up",
            "title": "Net Capped",
            "type": "boolean"
          },
          "uptime": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Seconds since the server was last started; lower than before once a reboot is done (a reset leaves it as it is). Only in Get a VPS, not in List VPS",
            "title": "Uptime"
          },
          "traffic": {
            "$ref": "#/components/schemas/VpsTraffic"
          }
        },
        "required": [
          "vps_uuid",
          "name",
          "plan_id",
          "image",
          "backups",
          "status",
          "ptr_custom",
          "net_capped",
          "traffic"
        ],
        "title": "Vps",
        "type": "object"
      },
      "VpsActionDone": {
        "properties": {
          "vps_uuid": {
            "title": "Vps Uuid",
            "type": "string"
          },
          "action": {
            "description": "The action sent to the server",
            "title": "Action",
            "type": "string"
          }
        },
        "required": [
          "vps_uuid",
          "action"
        ],
        "title": "VpsActionDone",
        "type": "object"
      },
      "VpsActionRequest": {
        "properties": {
          "action": {
            "type": "string",
            "title": "Action",
            "description": "start | stop | shutdown | reboot | reset (hard reboot)"
          }
        },
        "type": "object",
        "required": [
          "action"
        ],
        "title": "VpsActionRequest"
      },
      "VpsBackup": {
        "properties": {
          "id": {
            "description": "Backup id, for restore and delete",
            "title": "Id",
            "type": "string"
          },
          "created": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Unix time it was taken",
            "title": "Created"
          },
          "size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Size, bytes",
            "title": "Size"
          },
          "manual": {
            "description": "Taken with Back up now, not the daily one",
            "title": "Manual",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "manual"
        ],
        "title": "VpsBackup",
        "type": "object"
      },
      "VpsBackupDeleteRequest": {
        "properties": {
          "backup_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Backup Id",
            "description": "A backup id from GET /vps/{vps_uuid}/backups"
          }
        },
        "type": "object",
        "title": "VpsBackupDeleteRequest",
        "required": [
          "backup_id"
        ]
      },
      "VpsBackupDeleted": {
        "properties": {
          "vps_uuid": {
            "title": "Vps Uuid",
            "type": "string"
          },
          "deleted": {
            "description": "Id of the deleted backup",
            "title": "Deleted",
            "type": "string"
          }
        },
        "required": [
          "vps_uuid",
          "deleted"
        ],
        "title": "VpsBackupDeleted",
        "type": "object"
      },
      "VpsBackupJob": {
        "properties": {
          "kind": {
            "enum": [
              "backup",
              "restore"
            ],
            "title": "Kind",
            "type": "string"
          },
          "started": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Unix time it started",
            "title": "Started"
          },
          "pct": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "How far it got, percent; null before its first progress line",
            "title": "Pct"
          }
        },
        "required": [
          "kind"
        ],
        "title": "VpsBackupJob",
        "type": "object"
      },
      "VpsBackups": {
        "properties": {
          "enabled": {
            "description": "Daily backups on",
            "title": "Enabled",
            "type": "boolean"
          },
          "keep": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "How many backups are kept, manual ones included",
            "title": "Keep"
          },
          "schedule": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Daily start, HH:MM in the host's time",
            "title": "Schedule"
          },
          "next": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Unix time of the next daily backup",
            "title": "Next"
          },
          "job": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VpsBackupJob"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The backup or restore running now"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/VpsBackup"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "enabled",
          "items"
        ],
        "title": "VpsBackups",
        "type": "object"
      },
      "VpsBackupsRequest": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Daily backups on or off (adds the plan's backup share to the price)"
          }
        },
        "type": "object",
        "required": [
          "enabled"
        ],
        "title": "VpsBackupsRequest"
      },
      "VpsBackupsToggled": {
        "properties": {
          "vps_uuid": {
            "title": "Vps Uuid",
            "type": "string"
          },
          "enabled": {
            "description": "Daily backups on",
            "title": "Enabled",
            "type": "boolean"
          }
        },
        "required": [
          "vps_uuid",
          "enabled"
        ],
        "title": "VpsBackupsToggled",
        "type": "object"
      },
      "VpsCreateRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The server's name: 3 to 24 lowercase letters, digits and hyphens, starting with a letter, e.g. web-1"
          },
          "hostname": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hostname",
            "description": "<name>-<6 hex>.vm.scamp.pro as the panel previewed it (hostname, DNS name and reverse DNS); missing or not matching the name, a new one"
          },
          "plan_id": {
            "type": "string",
            "title": "Plan Id",
            "description": "A plan id from GET /vps/plans"
          },
          "image": {
            "type": "string",
            "title": "Image",
            "description": "An image id from GET /vps/images"
          },
          "ssh_key_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Ssh Key Ids",
            "description": "SSH keys saved in your account"
          },
          "password": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128,
                "minLength": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Password",
            "description": "Root password"
          },
          "backups": {
            "type": "boolean",
            "title": "Backups",
            "description": "Daily backups, adds the plan's backup share to the price",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "name",
          "plan_id",
          "image"
        ],
        "title": "VpsCreateRequest"
      },
      "VpsCreated": {
        "properties": {
          "vps_uuid": {
            "description": "VPS id",
            "title": "Vps Uuid",
            "type": "string"
          },
          "status": {
            "description": "Always queued: poll Get a VPS until it is running",
            "title": "Status",
            "type": "string"
          },
          "hostname": {
            "description": "Hostname, DNS name and reverse DNS of the server",
            "title": "Hostname",
            "type": "string"
          },
          "ipv4": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Public IPv4 address",
            "title": "Ipv4"
          },
          "ipv6_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "IPv6 /56",
            "title": "Ipv6 Prefix"
          }
        },
        "required": [
          "vps_uuid",
          "status",
          "hostname"
        ],
        "title": "VpsCreated",
        "type": "object"
      },
      "VpsError": {
        "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": "VpsError",
        "type": "object"
      },
      "VpsImage": {
        "properties": {
          "id": {
            "description": "Image id, for create and reinstall",
            "title": "Id",
            "type": "string"
          },
          "os": {
            "description": "Operating system",
            "title": "Os",
            "type": "string"
          },
          "version": {
            "description": "Its version",
            "title": "Version",
            "type": "string"
          }
        },
        "required": [
          "id",
          "os",
          "version"
        ],
        "title": "VpsImage",
        "type": "object"
      },
      "VpsImageList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/VpsImage"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "VpsImageList",
        "type": "object"
      },
      "VpsList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Vps"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "VpsList",
        "type": "object"
      },
      "VpsMetrics": {
        "properties": {
          "timeframe": {
            "enum": [
              "hour",
              "day",
              "week"
            ],
            "title": "Timeframe",
            "type": "string"
          },
          "points": {
            "description": "From the host side; null where the server was off",
            "items": {
              "$ref": "#/components/schemas/VpsMetricsPoint"
            },
            "title": "Points",
            "type": "array"
          }
        },
        "required": [
          "timeframe",
          "points"
        ],
        "title": "VpsMetrics",
        "type": "object"
      },
      "VpsMetricsPoint": {
        "properties": {
          "t": {
            "description": "Unix time of the point",
            "title": "T",
            "type": "integer"
          },
          "cpu": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Share of all the server's vCPUs in use, 0 to 1",
            "title": "Cpu"
          },
          "mem": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Memory the server takes, bytes",
            "title": "Mem"
          },
          "maxmem": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Memory of the plan, bytes",
            "title": "Maxmem"
          },
          "netin": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Traffic into the server, bytes a second",
            "title": "Netin"
          },
          "netout": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Traffic out of the server, bytes a second",
            "title": "Netout"
          },
          "diskread": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Disk reads, bytes a second",
            "title": "Diskread"
          },
          "diskwrite": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Disk writes, bytes a second",
            "title": "Diskwrite"
          },
          "pressurecpusome": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Share of time some programs waited for CPU, percent",
            "title": "Pressurecpusome"
          },
          "pressurecpufull": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Share of time all programs waited for CPU, percent",
            "title": "Pressurecpufull"
          },
          "pressurememorysome": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The same for memory, some programs",
            "title": "Pressurememorysome"
          },
          "pressurememoryfull": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The same for memory, all programs",
            "title": "Pressurememoryfull"
          },
          "pressureiosome": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The same for disk, some programs",
            "title": "Pressureiosome"
          },
          "pressureiofull": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The same for disk, all programs",
            "title": "Pressureiofull"
          }
        },
        "required": [
          "t"
        ],
        "title": "VpsMetricsPoint",
        "type": "object"
      },
      "VpsPlan": {
        "properties": {
          "id": {
            "description": "Plan id, for create and plan changes",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "description": "Name shown in the Cloud Panel",
            "title": "Name",
            "type": "string"
          },
          "vcpu": {
            "description": "vCPU cores",
            "title": "Vcpu",
            "type": "integer"
          },
          "cpu_limit": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Share of the cores the server may use, set on plans below one full core",
            "title": "Cpu Limit"
          },
          "ram_gb": {
            "description": "Memory, GB",
            "title": "Ram Gb",
            "type": "number"
          },
          "disk_gb": {
            "description": "Disk, GB",
            "title": "Disk Gb",
            "type": "integer"
          },
          "traffic_gb": {
            "description": "Outbound traffic a month, GB; after it the port runs at 100 Mbit/s",
            "title": "Traffic Gb",
            "type": "integer"
          },
          "net_mbit": {
            "description": "Port speed, Mbit/s",
            "title": "Net Mbit",
            "type": "integer"
          },
          "disk_iops": {
            "description": "Disk operations a second",
            "title": "Disk Iops",
            "type": "integer"
          },
          "disk_mbps": {
            "description": "Disk throughput, MB/s",
            "title": "Disk Mbps",
            "type": "integer"
          },
          "price_monthly": {
            "description": "Price a month, EUR, billed by the hour",
            "title": "Price Monthly",
            "type": "number"
          },
          "backup_share": {
            "description": "Daily backups add this share of the plan price",
            "title": "Backup Share",
            "type": "number"
          }
        },
        "required": [
          "id",
          "name",
          "vcpu",
          "ram_gb",
          "disk_gb",
          "traffic_gb",
          "net_mbit",
          "disk_iops",
          "disk_mbps",
          "price_monthly",
          "backup_share"
        ],
        "title": "VpsPlan",
        "type": "object"
      },
      "VpsPlanChanged": {
        "properties": {
          "vps_uuid": {
            "title": "Vps Uuid",
            "type": "string"
          },
          "plan_id": {
            "description": "The new plan",
            "title": "Plan Id",
            "type": "string"
          },
          "rebooted": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The server restarts to pick it up",
            "title": "Rebooted"
          }
        },
        "required": [
          "vps_uuid",
          "plan_id"
        ],
        "title": "VpsPlanChanged",
        "type": "object"
      },
      "VpsPlanList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/VpsPlan"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "VpsPlanList",
        "type": "object"
      },
      "VpsPlanRequest": {
        "properties": {
          "plan_id": {
            "type": "string",
            "title": "Plan Id",
            "description": "A bigger plan from GET /vps/plans"
          }
        },
        "type": "object",
        "required": [
          "plan_id"
        ],
        "title": "VpsPlanRequest"
      },
      "VpsPtr": {
        "properties": {
          "vps_uuid": {
            "title": "Vps Uuid",
            "type": "string"
          },
          "ptr": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Reverse DNS name now",
            "title": "Ptr"
          },
          "custom": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Set by you, not the default name",
            "title": "Custom"
          }
        },
        "required": [
          "vps_uuid"
        ],
        "title": "VpsPtr",
        "type": "object"
      },
      "VpsPtrRequest": {
        "properties": {
          "hostname": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 253
              },
              {
                "type": "null"
              }
            ],
            "title": "Hostname",
            "description": "PTR target, e.g. mail.example.com. Empty resets to the default name."
          }
        },
        "type": "object",
        "title": "VpsPtrRequest"
      },
      "VpsReinstallRequest": {
        "properties": {
          "image": {
            "type": "string",
            "title": "Image",
            "description": "An image id from GET /vps/images"
          },
          "ssh_key_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Ssh Key Ids"
          },
          "password": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128,
                "minLength": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Password",
            "description": "Root password"
          }
        },
        "type": "object",
        "required": [
          "image"
        ],
        "title": "VpsReinstallRequest"
      },
      "VpsRestoreRequest": {
        "properties": {
          "backup_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Backup Id",
            "description": "A backup id from GET /vps/{vps_uuid}/backups"
          }
        },
        "type": "object",
        "title": "VpsRestoreRequest",
        "required": [
          "backup_id"
        ]
      },
      "VpsStock": {
        "properties": {
          "items": {
            "additionalProperties": {
              "enum": [
                "in",
                "low",
                "out"
              ],
              "type": "string"
            },
            "description": "Plan id to in (in stock), low (few left) or out (a create gets 409)",
            "title": "Items",
            "type": "object"
          }
        },
        "required": [
          "items"
        ],
        "title": "VpsStock",
        "type": "object"
      },
      "VpsSummary": {
        "properties": {
          "paid_balance_eur": {
            "description": "Balance the VPS draw from, EUR",
            "title": "Paid Balance Eur",
            "type": "number"
          },
          "runway_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Days the balance lasts at the current rate; null with no VPS",
            "title": "Runway Days"
          },
          "hourly_eur": {
            "description": "What all VPS cost together an hour, EUR",
            "title": "Hourly Eur",
            "type": "number"
          },
          "monthly_eur": {
            "description": "The same a month, EUR",
            "title": "Monthly Eur",
            "type": "number"
          },
          "backups_on": {
            "description": "VPS with daily backups on",
            "title": "Backups On",
            "type": "integer"
          },
          "vcpu": {
            "description": "vCPU of all VPS",
            "title": "Vcpu",
            "type": "integer"
          },
          "ram_gb": {
            "description": "Memory of all VPS, GB",
            "title": "Ram Gb",
            "type": "number"
          },
          "disk_gb": {
            "description": "Disk of all VPS, GB",
            "title": "Disk Gb",
            "type": "integer"
          }
        },
        "required": [
          "paid_balance_eur",
          "hourly_eur",
          "monthly_eur",
          "backups_on",
          "vcpu",
          "ram_gb",
          "disk_gb"
        ],
        "title": "VpsSummary",
        "type": "object"
      },
      "VpsTaskStarted": {
        "properties": {
          "vps_uuid": {
            "title": "Vps Uuid",
            "type": "string"
          },
          "status": {
            "description": "What the server does now; poll Get a VPS to see it finish",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "vps_uuid",
          "status"
        ],
        "title": "VpsTaskStarted",
        "type": "object"
      },
      "VpsTraffic": {
        "properties": {
          "month": {
            "description": "Calendar month, UTC, as YYYY-MM",
            "title": "Month",
            "type": "string"
          },
          "out_bytes": {
            "description": "Outbound bytes this month; counts against the plan quota",
            "title": "Out Bytes",
            "type": "integer"
          },
          "in_bytes": {
            "description": "Inbound bytes this month; free",
            "title": "In Bytes",
            "type": "integer"
          }
        },
        "required": [
          "month",
          "out_bytes",
          "in_bytes"
        ],
        "title": "VpsTraffic",
        "type": "object"
      }
    },
    "securitySchemes": {
      "token": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API token: sc_ and 40 characters"
      }
    }
  },
  "security": [
    {
      "token": []
    }
  ]
}