{
  "openapi": "3.1.0",
  "info": {
    "title": "ServersCamp API",
    "version": "1.0",
    "description": "Manage ServersCamp resources with an API token. Make tokens in the Cloud Panel under Settings, API tokens, and send one as `Authorization: Bearer sc_...`."
  },
  "servers": [
    {
      "url": "https://platform.serverscamp.com"
    }
  ],
  "tags": [
    {
      "name": "catalog",
      "x-displayName": "Disks"
    },
    {
      "name": "volumes",
      "x-displayName": "Volumes"
    },
    {
      "name": "attach",
      "x-displayName": "Attach and detach"
    },
    {
      "name": "change",
      "x-displayName": "Size and disk"
    }
  ],
  "paths": {
    "/api/v1/storage-classes": {
      "get": {
        "parameters": [
          {
            "name": "line",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(legacy|v2|all)$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this line: legacy (the R/W tiers) or v2 (Standard and Enterprise). All when omitted or all.",
              "title": "Line"
            },
            "description": "v2 for the disks on sale; all when left out"
          }
        ],
        "operationId": "list-disks",
        "summary": "List disks",
        "description": "The disks. Ask with line=v2 for the ones on sale: standard and enterprise, each also dedicated. Their ids go into Create a volume and Change the disk.",
        "tags": [
          "catalog"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VmDiskList"
                },
                "example": {
                  "items": [
                    {
                      "id": 18,
                      "name": "standard",
                      "dedicated": false,
                      "read_iops_limit": 100000,
                      "write_iops_limit": 100000,
                      "read_bandwidth_limit": 1024,
                      "write_bandwidth_limit": 1024,
                      "min_size_gb": 25,
                      "max_size_gb": 5000,
                      "free_size_gb": 25,
                      "price_per_gb_hour_millicents": 1.1111,
                      "line": "v2"
                    }
                  ],
                  "total": 1
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          }
        },
        "x-group": "catalog",
        "x-order": 0
      }
    },
    "/api/v1/volumes": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VolumeCreate"
              },
              "example": {
                "display_name": "data",
                "size_gb": 100,
                "storage_class_id": 18
              },
              "examples": {
                "e0": {
                  "summary": "100 GB Standard",
                  "value": {
                    "display_name": "data",
                    "size_gb": 100,
                    "storage_class_id": 18
                  }
                },
                "e1": {
                  "summary": "500 GB Enterprise for a database",
                  "value": {
                    "display_name": "pg-data",
                    "size_gb": 500,
                    "storage_class_id": 20
                  }
                },
                "e2": {
                  "summary": "From a snapshot",
                  "value": {
                    "display_name": "data-copy",
                    "size_gb": 100,
                    "storage_class_id": 18,
                    "source_snapshot_id": "5e8b2c41-0d7a-4f39-b6e2-91c3a8d4f017"
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "create",
        "summary": "Create a volume",
        "description": "Creates a volume, usually in a few seconds; one from a backup takes longer, by its size. Poll Get a volume until its state is created, then attach it. The volume is billed by the hour for its size, attached or not.",
        "tags": [
          "volumes"
        ],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolCreated"
                },
                "example": {
                  "disk_uuid": "c7a1e3f9-52b8-4d06-9e41-8b3f2a6d0c75",
                  "display_name": "data",
                  "size_gb": 100,
                  "status": "queued"
                }
              }
            }
          },
          "400": {
            "description": "A disk or size that is not accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "402": {
            "description": "The balance is too low",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "403": {
            "description": "The volume limit of the account is reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "404": {
            "description": "No such snapshot or backup in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          }
        },
        "x-group": "volumes",
        "x-order": 101,
        "x-wait": "volume"
      },
      "get": {
        "operationId": "list",
        "summary": "List volumes",
        "description": "Every volume of the account, with the server each one is attached to.",
        "tags": [
          "volumes"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolumeList"
                },
                "example": {
                  "items": [
                    {
                      "disk_uuid": "c7a1e3f9-52b8-4d06-9e41-8b3f2a6d0c75",
                      "display_name": "data",
                      "size_gb": 100,
                      "storage_class_id": 18,
                      "storage_class_name": "standard",
                      "limits": {
                        "read_iops_limit": 100000,
                        "write_iops_limit": 100000,
                        "read_bandwidth_limit": 1024,
                        "write_bandwidth_limit": 1024
                      },
                      "state": "created",
                      "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
                      "attached_vm_name": "web-1",
                      "monthly_cost_eur": 8,
                      "provision_phase": null,
                      "provision_pct": null,
                      "created_at": "2026-11-01T09:40:02+00:00"
                    }
                  ],
                  "total": 1
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          }
        },
        "x-group": "volumes",
        "x-order": 102
      }
    },
    "/api/v1/volumes/{disk_uuid}": {
      "get": {
        "parameters": [
          {
            "name": "disk_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Disk Uuid"
            },
            "description": "Volume id, from Create a volume or List volumes"
          }
        ],
        "operationId": "get",
        "summary": "Get a volume",
        "description": "One volume with its state, size, limits and server.",
        "tags": [
          "volumes"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Volume"
                },
                "example": {
                  "disk_uuid": "c7a1e3f9-52b8-4d06-9e41-8b3f2a6d0c75",
                  "display_name": "data",
                  "size_gb": 100,
                  "storage_class_id": 18,
                  "storage_class_name": "standard",
                  "limits": {
                    "read_iops_limit": 100000,
                    "write_iops_limit": 100000,
                    "read_bandwidth_limit": 1024,
                    "write_bandwidth_limit": 1024
                  },
                  "state": "created",
                  "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
                  "attached_vm_name": "web-1",
                  "monthly_cost_eur": 8,
                  "provision_phase": null,
                  "provision_pct": null,
                  "created_at": "2026-11-01T09:40:02+00:00"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "404": {
            "description": "No such volume in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          }
        },
        "x-group": "volumes",
        "x-order": 103
      },
      "delete": {
        "parameters": [
          {
            "name": "disk_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Disk Uuid"
            },
            "description": "Volume id, from Create a volume or List volumes"
          }
        ],
        "operationId": "delete",
        "summary": "Delete a volume",
        "description": "Deletes the volume and its data. Detach it first. Billing stops at once; Get a volume answers 404 once it is gone.",
        "tags": [
          "volumes"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolDone"
                },
                "example": {
                  "success": true,
                  "message": "Volume deletion started"
                }
              }
            }
          },
          "400": {
            "description": "The volume is attached; detach it first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "404": {
            "description": "No such volume in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "409": {
            "description": "The volume is busy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          }
        },
        "x-group": "volumes",
        "x-order": 104,
        "x-wait": "gone"
      }
    },
    "/api/v1/volumes/{disk_uuid}/attach": {
      "post": {
        "parameters": [
          {
            "name": "disk_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Disk Uuid"
            },
            "description": "Volume id, from Create a volume or List volumes"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VolumeAttachRequest"
              },
              "example": {
                "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34"
              },
              "examples": {
                "e0": {
                  "summary": "Attach",
                  "value": {
                    "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34"
                  }
                }
              }
            }
          }
        },
        "operationId": "attach",
        "summary": "Attach to a server",
        "description": "Attaches the volume to a running server without a restart. The server sees a new disk, usually /dev/vdb; format and mount it the first time. A volume is on one server at a time.",
        "tags": [
          "attach"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolAttach"
                },
                "example": {
                  "disk_uuid": "c7a1e3f9-52b8-4d06-9e41-8b3f2a6d0c75",
                  "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
                  "status": "attach_queued"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "404": {
            "description": "No such volume or server in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "409": {
            "description": "The volume is attached already, or busy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          }
        },
        "x-group": "attach",
        "x-order": 205,
        "x-wait": "volume"
      }
    },
    "/api/v1/volumes/{disk_uuid}/detach": {
      "post": {
        "parameters": [
          {
            "name": "disk_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Disk Uuid"
            },
            "description": "Volume id, from Create a volume or List volumes"
          }
        ],
        "operationId": "detach",
        "summary": "Detach",
        "description": "Detaches the volume from its server. Unmount it inside the server first. The data stays on the volume, ready for another server.",
        "tags": [
          "attach"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolDone"
                },
                "example": {
                  "success": true,
                  "message": "Volume detached from VM"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "404": {
            "description": "No such volume in your account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "409": {
            "description": "The volume is not attached, or busy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          }
        },
        "x-group": "attach",
        "x-order": 206,
        "x-wait": "volume"
      }
    },
    "/api/v1/volumes/{disk_uuid}/resize": {
      "post": {
        "parameters": [
          {
            "name": "disk_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Disk Uuid"
            },
            "description": "Volume id, from Create a volume or List volumes"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VolumeResizeRequest"
              },
              "example": {
                "new_size_gb": 200
              },
              "examples": {
                "e0": {
                  "summary": "To 200 GB",
                  "value": {
                    "new_size_gb": 200
                  }
                }
              }
            }
          }
        },
        "operationId": "grow",
        "summary": "Grow a volume",
        "description": "Grows the volume while it is in use. A volume cannot shrink. Grow the filesystem inside the server after it, for example with resize2fs or xfs_growfs.",
        "tags": [
          "change"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolDiskOp"
                },
                "example": {
                  "disk_uuid": "c7a1e3f9-52b8-4d06-9e41-8b3f2a6d0c75",
                  "status": "resize_queued",
                  "size_gb": 200,
                  "storage_class_id": 18
                }
              }
            }
          },
          "400": {
            "description": "Not bigger than now, or above the disk's largest size",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "409": {
            "description": "The volume is busy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          }
        },
        "x-group": "change",
        "x-order": 307,
        "x-wait": "volume"
      }
    },
    "/api/v1/volumes/{disk_uuid}/change-class": {
      "post": {
        "parameters": [
          {
            "name": "disk_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Disk Uuid"
            },
            "description": "Volume id, from Create a volume or List volumes"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VolumeChangeClassRequest"
              },
              "example": {
                "storage_class_id": 19
              },
              "examples": {
                "e0": {
                  "summary": "To dedicated",
                  "value": {
                    "storage_class_id": 19
                  }
                }
              }
            }
          }
        },
        "operationId": "change-disk",
        "summary": "Change the disk",
        "description": "Moves the volume between shared and dedicated while it is in use. The data stays in place and the new price applies from the next hour.",
        "tags": [
          "change"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolDiskOp"
                },
                "example": {
                  "disk_uuid": "c7a1e3f9-52b8-4d06-9e41-8b3f2a6d0c75",
                  "status": "class_change_queued",
                  "size_gb": 100,
                  "storage_class_id": 19
                }
              }
            }
          },
          "400": {
            "description": "A disk the volume cannot move to, or the one it has",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "401": {
            "description": "No token, or a token that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "409": {
            "description": "The volume is busy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          },
          "422": {
            "description": "The body or a parameter is not what the operation takes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolError"
                }
              }
            }
          }
        },
        "x-group": "change",
        "x-order": 308,
        "x-wait": "volume"
      }
    }
  },
  "components": {
    "schemas": {
      "VmDisk": {
        "properties": {
          "id": {
            "description": "Disk id, for storage_class_id in Create a VM and Change the disk",
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "description": "standard, enterprise, standard-dedicated or enterprise-dedicated",
            "title": "Name",
            "type": "string"
          },
          "dedicated": {
            "description": "Keeps its full performance when the storage cluster runs short",
            "title": "Dedicated",
            "type": "boolean"
          },
          "read_iops_limit": {
            "description": "Read operations a second, at most",
            "title": "Read Iops Limit",
            "type": "integer"
          },
          "write_iops_limit": {
            "description": "Write operations a second, at most",
            "title": "Write Iops Limit",
            "type": "integer"
          },
          "read_bandwidth_limit": {
            "description": "Read throughput, MB/s, at most",
            "title": "Read Bandwidth Limit",
            "type": "integer"
          },
          "write_bandwidth_limit": {
            "description": "Write throughput, MB/s, at most",
            "title": "Write Bandwidth Limit",
            "type": "integer"
          },
          "min_size_gb": {
            "description": "Smallest disk, GB",
            "title": "Min Size Gb",
            "type": "integer"
          },
          "max_size_gb": {
            "description": "Largest disk, GB",
            "title": "Max Size Gb",
            "type": "integer"
          },
          "free_size_gb": {
            "description": "GB of a root disk that are free; 25 on standard, 0 on the others",
            "title": "Free Size Gb",
            "type": "integer"
          },
          "price_per_gb_hour_millicents": {
            "description": "Price of a GB an hour in millicents: 10,000 make 1 EUR",
            "title": "Price Per Gb Hour Millicents",
            "type": "number"
          },
          "line": {
            "description": "v2 for the disks on sale",
            "enum": [
              "legacy",
              "v2"
            ],
            "title": "Line",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "dedicated",
          "read_iops_limit",
          "write_iops_limit",
          "read_bandwidth_limit",
          "write_bandwidth_limit",
          "min_size_gb",
          "max_size_gb",
          "free_size_gb",
          "price_per_gb_hour_millicents",
          "line"
        ],
        "title": "VmDisk",
        "type": "object"
      },
      "VmDiskList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/VmDisk"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "title": "VmDiskList",
        "type": "object"
      },
      "VolAttach": {
        "properties": {
          "disk_uuid": {
            "title": "Disk Uuid",
            "type": "string"
          },
          "vm_uuid": {
            "description": "The server it goes to",
            "title": "Vm Uuid",
            "type": "string"
          },
          "status": {
            "description": "attach_queued: poll Get a volume until vm_uuid is set and the state settles",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "disk_uuid",
          "vm_uuid",
          "status"
        ],
        "title": "VolAttach",
        "type": "object"
      },
      "VolCreated": {
        "properties": {
          "disk_uuid": {
            "description": "Volume id",
            "title": "Disk Uuid",
            "type": "string"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The name you gave",
            "title": "Display Name"
          },
          "size_gb": {
            "description": "Size, GB",
            "title": "Size Gb",
            "type": "integer"
          },
          "status": {
            "description": "queued: poll Get a volume until it is created",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "disk_uuid",
          "size_gb",
          "status"
        ],
        "title": "VolCreated",
        "type": "object"
      },
      "VolDiskOp": {
        "properties": {
          "disk_uuid": {
            "title": "Disk Uuid",
            "type": "string"
          },
          "status": {
            "description": "resize_queued or class_change_queued: the change runs while the volume is in use",
            "title": "Status",
            "type": "string"
          },
          "size_gb": {
            "description": "Size after the change, GB",
            "title": "Size Gb",
            "type": "integer"
          },
          "storage_class_id": {
            "description": "Disk id after the change",
            "title": "Storage Class Id",
            "type": "integer"
          }
        },
        "required": [
          "disk_uuid",
          "status",
          "size_gb",
          "storage_class_id"
        ],
        "title": "VolDiskOp",
        "type": "object"
      },
      "VolDone": {
        "properties": {
          "success": {
            "title": "Success",
            "type": "boolean"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "title": "VolDone",
        "type": "object"
      },
      "VolError": {
        "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": "VolError",
        "type": "object"
      },
      "VolLimits": {
        "properties": {
          "read_iops_limit": {
            "description": "Read operations a second, at most",
            "title": "Read Iops Limit",
            "type": "integer"
          },
          "write_iops_limit": {
            "description": "Write operations a second, at most",
            "title": "Write Iops Limit",
            "type": "integer"
          },
          "read_bandwidth_limit": {
            "description": "Read throughput, MB/s, at most",
            "title": "Read Bandwidth Limit",
            "type": "integer"
          },
          "write_bandwidth_limit": {
            "description": "Write throughput, MB/s, at most",
            "title": "Write Bandwidth Limit",
            "type": "integer"
          }
        },
        "required": [
          "read_iops_limit",
          "write_iops_limit",
          "read_bandwidth_limit",
          "write_bandwidth_limit"
        ],
        "title": "VolLimits",
        "type": "object"
      },
      "Volume": {
        "properties": {
          "disk_uuid": {
            "description": "Volume id",
            "title": "Disk Uuid",
            "type": "string"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Name given at create",
            "title": "Display Name"
          },
          "size_gb": {
            "description": "Size, GB",
            "title": "Size Gb",
            "type": "integer"
          },
          "storage_class_id": {
            "description": "Disk id: standard, enterprise or their dedicated twins",
            "title": "Storage Class Id",
            "type": "integer"
          },
          "storage_class_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Disk name",
            "title": "Storage Class Name"
          },
          "limits": {
            "$ref": "#/components/schemas/VolLimits"
          },
          "state": {
            "description": "creating while it is made, then created; attaching, detaching, resizing and deleting while those run; failed when something went wrong",
            "title": "State",
            "type": "string"
          },
          "vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Server it is attached to; null when it is free",
            "title": "Vm Uuid"
          },
          "attached_vm_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Name of that server",
            "title": "Attached Vm Name"
          },
          "monthly_cost_eur": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "What the volume costs a month at its size, EUR",
            "title": "Monthly Cost Eur"
          },
          "provision_phase": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "While a volume is made from a backup: preparing, restoring, then ready",
            "title": "Provision Phase"
          },
          "provision_pct": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "How far that restore got, percent",
            "title": "Provision Pct"
          },
          "created_at": {
            "description": "When it was created, ISO 8601",
            "title": "Created At",
            "type": "string"
          }
        },
        "required": [
          "disk_uuid",
          "size_gb",
          "storage_class_id",
          "limits",
          "state",
          "created_at"
        ],
        "title": "Volume",
        "type": "object"
      },
      "VolumeAttachRequest": {
        "properties": {
          "vm_uuid": {
            "type": "string",
            "title": "Vm Uuid",
            "description": "Server id, from List VMs of the cloud VM API"
          }
        },
        "type": "object",
        "required": [
          "vm_uuid"
        ],
        "title": "VolumeAttachRequest",
        "description": "Request to attach volume to VM."
      },
      "VolumeChangeClassRequest": {
        "properties": {
          "storage_class_id": {
            "type": "integer",
            "title": "Storage Class Id",
            "description": "The new disk id, from List disks"
          }
        },
        "type": "object",
        "required": [
          "storage_class_id"
        ],
        "title": "VolumeChangeClassRequest",
        "description": "Request to switch a volume between storage classes (throttle limits only).\nAll classes share one Vitastor pool, so this is a live, no-data-migration op."
      },
      "VolumeCreate": {
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name",
            "description": "Name of the volume"
          },
          "size_gb": {
            "type": "integer",
            "maximum": 10000,
            "minimum": 1,
            "title": "Size Gb",
            "description": "Size, GB: up to 5,000 on standard, up to 10,000 on enterprise"
          },
          "storage_class_id": {
            "type": "integer",
            "title": "Storage Class Id",
            "description": "Disk id, from List disks"
          },
          "source_snapshot_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Snapshot Id",
            "description": "Make the volume from a snapshot of another volume"
          },
          "source_backup_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Backup Id",
            "description": "Make the volume from a backup of another volume"
          }
        },
        "type": "object",
        "required": [
          "size_gb",
          "storage_class_id"
        ],
        "title": "VolumeCreate",
        "description": "Request to create volume."
      },
      "VolumeList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Volume"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "title": "VolumeList",
        "type": "object"
      },
      "VolumeResizeRequest": {
        "properties": {
          "new_size_gb": {
            "type": "integer",
            "maximum": 10000,
            "minimum": 1,
            "title": "New Size Gb",
            "description": "New size, GB; bigger than now"
          }
        },
        "type": "object",
        "required": [
          "new_size_gb"
        ],
        "title": "VolumeResizeRequest",
        "description": "Request to grow a volume. Shrink is not supported."
      }
    },
    "securitySchemes": {
      "token": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API token: sc_ and 40 characters"
      }
    }
  },
  "security": [
    {
      "token": []
    }
  ]
}