{
  "components": {
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "Refused; see code."
      }
    },
    "schemas": {
      "Action": {
        "properties": {
          "command": {
            "enum": [
              "create",
              "start",
              "stop",
              "kill",
              "restart",
              "suspend",
              "unsuspend",
              "terminate",
              "reinstall",
              "resize",
              "reset_password",
              "traffic_cap",
              "traffic_uncap",
              "ip_change_external"
            ],
            "type": "string"
          },
          "error": {
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "finished_at": {
            "description": "RFC 3339 time, UTC.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "progress": {
            "format": "int64",
            "maximum": 100,
            "minimum": 0,
            "type": "integer"
          },
          "region": {
            "type": "string"
          },
          "server_id": {
            "format": "int64",
            "type": "integer"
          },
          "started_at": {
            "description": "RFC 3339 time, UTC.",
            "format": "date-time",
            "type": "string"
          },
          "state": {
            "enum": [
              "running",
              "success",
              "error"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "region",
          "command",
          "state",
          "progress",
          "server_id",
          "error",
          "started_at",
          "finished_at"
        ],
        "type": "object"
      },
      "Billing": {
        "properties": {
          "minimum_hours": {
            "description": "Minimum charged, in hours, in the datacenter asked for (default otherwise).",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "mode": {
            "enum": [
              "hourly",
              "monthly"
            ],
            "type": "string"
          },
          "price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Price"
              },
              {
                "type": "null"
              }
            ]
          },
          "sku": {
            "description": "Accounting SKU: vps.plan.<code>.<mode>. Prices and minimums are accounting's.",
            "type": "string"
          }
        },
        "required": [
          "mode",
          "sku",
          "price",
          "minimum_hours"
        ],
        "type": "object"
      },
      "Capabilities": {
        "description": "What the server's hypervisor can do. Anything off is refused with feature_unavailable.",
        "properties": {
          "console": {
            "description": "POST /servers/{id}/console mints a browser console.",
            "type": "boolean"
          },
          "kill": {
            "description": "A hard power-off.",
            "type": "boolean"
          },
          "power": {
            "description": "start, stop (graceful) and restart.",
            "type": "boolean"
          },
          "reinstall": {
            "description": "POST /servers/{id}/reinstall.",
            "type": "boolean"
          },
          "reset_password": {
            "description": "POST /servers/{id}/reset-password.",
            "type": "boolean"
          },
          "resize": {
            "description": "POST /servers/{id}/resize.",
            "type": "boolean"
          },
          "traffic": {
            "description": "GET /servers/{id}/traffic is metered.",
            "type": "boolean"
          }
        },
        "required": [
          "power",
          "kill",
          "console",
          "traffic",
          "reinstall",
          "resize",
          "reset_password"
        ],
        "type": "object"
      },
      "Datacenter": {
        "properties": {
          "capabilities": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Capabilities"
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": "string"
          },
          "country": {
            "description": "ISO 3166 alpha-2.",
            "type": [
              "string",
              "null"
            ]
          },
          "features": {
            "description": "What the datacenter offers, in display order (the order form's list); empty when none was set.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "first_month_traffic": {
            "description": "A server created mid-period gets the plan's whole quota (full) or the share of the days left (prorated) for that first period.",
            "enum": [
              "full",
              "prorated"
            ],
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "name_local": {
            "type": [
              "string",
              "null"
            ]
          },
          "orderable": {
            "description": "Takes new servers now.",
            "type": "boolean"
          },
          "region": {
            "description": "The install's region code.",
            "type": "string"
          },
          "rules": {
            "description": "The terms of buying there, in display order (shown before an order).",
            "items": {
              "properties": {
                "content": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                }
              },
              "required": [
                "title",
                "content"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "state": {
            "enum": [
              "active",
              "closed"
            ],
            "type": "string"
          }
        },
        "required": [
          "code",
          "region",
          "name",
          "state",
          "orderable"
        ],
        "type": "object"
      },
      "Error": {
        "properties": {
          "code": {
            "description": "Stable machine code.",
            "enum": [
              "action_failed",
              "action_in_progress",
              "already_adopted",
              "conflict",
              "core_unavailable",
              "create_rejected",
              "datacenter_closed",
              "disk_cannot_shrink",
              "feature_unavailable",
              "forbidden",
              "host_pin_mismatch",
              "host_unauthorized",
              "host_unreachable",
              "hostname_taken",
              "hypervisor_unavailable",
              "id_prefix_in_use",
              "id_prefix_taken",
              "identity_needed",
              "image_unavailable",
              "insufficient_balance",
              "internal_error",
              "invalid_cursor",
              "invalid_input",
              "invalid_kind",
              "invalid_state",
              "method_not_allowed",
              "name_taken",
              "not_for_sale",
              "not_found",
              "plan_mismatch",
              "plan_unavailable",
              "prepaid_term",
              "rate_limit_exceeded",
              "same_plan",
              "server_busy",
              "server_failed",
              "server_missing",
              "server_not_capped",
              "server_not_found",
              "server_not_running",
              "server_not_suspended",
              "server_pending",
              "server_protected",
              "server_suspended",
              "server_terminated",
              "sold_out",
              "task_timeout",
              "unauthorized",
              "unavailable",
              "vm_not_found"
            ],
            "type": "string"
          },
          "error": {
            "description": "English, for people. Branch on code.",
            "type": "string"
          }
        },
        "required": [
          "error",
          "code"
        ],
        "type": "object"
      },
      "Image": {
        "properties": {
          "datacenters": {
            "description": "Datacenter codes it can be installed in.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "icon": {
            "description": "Icon slug (the OS family).",
            "type": "string"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "os_family": {
            "type": "string"
          },
          "os_version": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "slug",
          "name",
          "os_family",
          "os_version",
          "datacenters"
        ],
        "type": "object"
      },
      "Plan": {
        "properties": {
          "billing": {
            "items": {
              "$ref": "#/components/schemas/Billing"
            },
            "type": "array"
          },
          "code": {
            "type": "string"
          },
          "cpu_cores": {
            "format": "int64",
            "type": "integer"
          },
          "datacenters": {
            "description": "Datacenter codes it can be ordered in.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "disk_gb": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "included_traffic_gb": {
            "description": "Traffic quota per period (a calendar month of the region's calendar), GB = 2^30 bytes. No proration. Null: unmetered.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "is_recommended": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "name_local": {
            "type": [
              "string",
              "null"
            ]
          },
          "ram_mb": {
            "format": "int64",
            "type": "integer"
          },
          "traffic_direction": {
            "description": "What counts against the quota; null: the datacenter's (download by default).",
            "enum": [
              "download",
              "both"
            ],
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "code",
          "name",
          "cpu_cores",
          "ram_mb",
          "disk_gb",
          "billing",
          "datacenters"
        ],
        "type": "object"
      },
      "Price": {
        "description": "For display; what is charged is accounting's.",
        "properties": {
          "amount": {
            "description": "Decimal string.",
            "type": "string"
          },
          "currency": {
            "description": "ISO 4217.",
            "type": "string"
          },
          "unit": {
            "enum": [
              "hour",
              "month",
              "GB"
            ],
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "amount",
          "currency"
        ],
        "type": "object"
      },
      "Server": {
        "description": "capabilities is on GET /servers/{id} only.",
        "properties": {
          "billing_mode": {
            "enum": [
              "hourly",
              "monthly"
            ],
            "type": "string"
          },
          "capabilities": {
            "$ref": "#/components/schemas/Capabilities"
          },
          "core_status": {
            "description": "The state in core's service vocabulary.",
            "enum": [
              "creating",
              "active",
              "suspended",
              "abuse_suspended",
              "terminated",
              "failed",
              "reinstalling_os",
              "powering_on",
              "powering_off",
              "restarting"
            ],
            "type": "string"
          },
          "country": {
            "description": "ISO 3166 alpha-2.",
            "type": [
              "string",
              "null"
            ]
          },
          "cpu_cores": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "created_at": {
            "description": "RFC 3339 time, UTC.",
            "format": "date-time",
            "type": "string"
          },
          "datacenter": {
            "type": "string"
          },
          "datacenter_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "datacenter_name_local": {
            "type": [
              "string",
              "null"
            ]
          },
          "disk_gb": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "hostname": {
            "type": "string"
          },
          "id": {
            "description": "Unique across regions: datacenter prefix x 10^9 + sequence.",
            "format": "int64",
            "type": "integer"
          },
          "image": {
            "properties": {
              "icon": {
                "type": "string"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "os_family": {
                "type": "string"
              },
              "os_version": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "slug",
              "name"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "image_id": {
            "format": "int64",
            "type": "integer"
          },
          "ipv4": {
            "type": [
              "string",
              "null"
            ]
          },
          "ipv6": {
            "description": "Not assigned by hosts yet.",
            "type": "null"
          },
          "network_suspended_at": {
            "description": "RFC 3339 time, UTC.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "network_suspension_reason": {
            "description": "The network is cut while the server runs.",
            "enum": [
              "traffic_cap"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "paid_until": {
            "description": "The end of a term paid in the previous panel (#589); the first monthly charge is then.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "plan": {
            "properties": {
              "code": {
                "type": "string"
              },
              "cpu_cores": {
                "format": "int64",
                "type": "integer"
              },
              "disk_gb": {
                "format": "int64",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              },
              "included_traffic_gb": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "name_local": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "ram_mb": {
                "format": "int64",
                "type": "integer"
              },
              "traffic_direction": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "code",
              "name"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "plan_id": {
            "format": "int64",
            "type": "integer"
          },
          "power_state": {
            "enum": [
              "running",
              "stopped",
              "paused",
              "crashed",
              "unknown"
            ],
            "type": "string"
          },
          "project_id": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "ram_mb": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "region": {
            "type": "string"
          },
          "running_action": {
            "properties": {
              "command": {
                "type": "string"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              },
              "progress": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "command",
              "progress"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "started_at": {
            "description": "RFC 3339 time, UTC.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "enum": [
              "pending",
              "active",
              "suspended",
              "terminated"
            ],
            "type": "string"
          },
          "suspended_at": {
            "description": "RFC 3339 time, UTC.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "suspension_reason": {
            "enum": [
              "non_payment",
              "abuse",
              "admin"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "terminated_at": {
            "description": "RFC 3339 time, UTC.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "terminates_at": {
            "description": "A suspended server is deleted then unless unsuspended.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "traffic": {
            "description": "The current traffic period as last metered; null when unmetered or not read yet.",
            "properties": {
              "capped": {
                "type": "boolean"
              },
              "overage_bytes": {
                "format": "int64",
                "type": "integer"
              },
              "period_end": {
                "description": "RFC 3339 time, UTC.",
                "format": "date-time",
                "type": "string"
              },
              "period_key": {
                "type": "string"
              },
              "quota_bytes": {
                "format": "int64",
                "type": "integer"
              },
              "read_at": {
                "description": "RFC 3339 time, UTC.",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "used_bytes": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "period_key",
              "period_end",
              "used_bytes",
              "quota_bytes",
              "overage_bytes",
              "capped"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "traffic_overage_billing": {
            "description": "The traffic overage switch (#595): true bills every GB past the quota; false never does and cuts the network at the quota until the next period.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "region",
          "datacenter",
          "hostname",
          "plan_id",
          "image_id",
          "billing_mode",
          "state",
          "power_state",
          "created_at"
        ],
        "type": "object"
      },
      "Traffic": {
        "properties": {
          "billable_overage_bytes": {
            "description": "overage_bytes less the forgiven overage: what is or will be billed.",
            "format": "int64",
            "type": "integer"
          },
          "billed_cost": {
            "description": "billed_gb at price_per_gb, for display.",
            "properties": {
              "amount": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              }
            },
            "required": [
              "amount",
              "currency"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "billed_gb": {
            "description": "Overage billed so far this period (3 decimals).",
            "type": "string"
          },
          "calendar": {
            "enum": [
              "jalali",
              "gregorian"
            ],
            "type": "string"
          },
          "capped": {
            "description": "The network is cut for the traffic cap.",
            "type": "boolean"
          },
          "estimated_overage": {
            "description": "billable_overage_bytes at price_per_gb, for display.",
            "properties": {
              "amount": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              }
            },
            "required": [
              "amount",
              "currency"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "forgiven_gb": {
            "description": "Overage this period that is never billed (3 decimals): an adopted server's overage billed by the system it came from, or what was over the quota while the overage switch was off.",
            "type": "string"
          },
          "from": {
            "description": "RFC 3339 time, UTC.",
            "format": "date-time",
            "type": "string"
          },
          "granularity": {
            "enum": [
              "hour",
              "day"
            ],
            "type": "string"
          },
          "included_gb": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "metered": {
            "description": "What counts against the quota; null: unmetered plan.",
            "enum": [
              "download",
              "both"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "overage_billed_gb": {
            "description": "Overage sent for billing so far this period (3 decimals). Same as billed_gb.",
            "type": "string"
          },
          "overage_billing": {
            "description": "Overage past the quota is billed now (the region bills it and the switch is on).",
            "type": "boolean"
          },
          "overage_bytes": {
            "description": "Counted above the quota this period.",
            "format": "int64",
            "type": "integer"
          },
          "overage_switch": {
            "description": "The customer's traffic overage switch (#595); PUT /servers/{id}/traffic-settings.",
            "type": "boolean"
          },
          "percent": {
            "type": [
              "number",
              "null"
            ]
          },
          "period_end": {
            "description": "The quota resets then.",
            "format": "date-time",
            "type": "string"
          },
          "period_key": {
            "description": "e.g. 1405-08.",
            "type": "string"
          },
          "period_rx_bytes": {
            "format": "int64",
            "type": "integer"
          },
          "period_start": {
            "description": "RFC 3339 time, UTC.",
            "format": "date-time",
            "type": "string"
          },
          "period_tx_bytes": {
            "format": "int64",
            "type": "integer"
          },
          "points": {
            "items": {
              "properties": {
                "rx_bytes": {
                  "format": "int64",
                  "type": "integer"
                },
                "start": {
                  "format": "date-time",
                  "type": "string"
                },
                "tx_bytes": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "start",
                "rx_bytes",
                "tx_bytes"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "price_per_gb": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Price"
              },
              {
                "type": "null"
              }
            ]
          },
          "quota_bytes": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "remaining_bytes": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "rx_bytes": {
            "description": "Received by the server (download) in the window.",
            "format": "int64",
            "type": "integer"
          },
          "time_zone": {
            "description": "The region's zone: day buckets are its calendar days.",
            "type": "string"
          },
          "to": {
            "description": "RFC 3339 time, UTC.",
            "format": "date-time",
            "type": "string"
          },
          "tx_bytes": {
            "description": "Sent by the server in the window.",
            "format": "int64",
            "type": "integer"
          },
          "used_bytes": {
            "description": "Counted this period.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "from",
          "to",
          "granularity",
          "time_zone",
          "rx_bytes",
          "tx_bytes",
          "points",
          "metered",
          "period_start",
          "period_end",
          "used_bytes",
          "quota_bytes",
          "overage_bytes"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "session": {
        "description": "A session from POST /auth/exchange with core's handoff assertion.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Virtual private servers in one region. Every region serves the same API at its own base URL; ids are unique across regions. Long operations answer 202 with an action to poll. Errors carry a stable `code`. Requests are rate limited per caller (RateLimit-* headers, 429 rate_limit_exceeded).",
    "title": "Arianet VPS API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/actions": {
      "get": {
        "description": "Requires the `vps:view` permission.",
        "operationId": "listActions",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Action"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Your latest operations",
        "x-permission": "vps:view"
      }
    },
    "/actions/{id}": {
      "get": {
        "description": "Requires the `vps:view` permission.",
        "operationId": "getAction",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Action"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "One operation; poll it until state is success or error",
        "x-permission": "vps:view"
      }
    },
    "/datacenters": {
      "get": {
        "operationId": "listDatacenters",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Datacenter"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Datacenters of this region, with what their hosts can do"
      }
    },
    "/images": {
      "get": {
        "operationId": "listImages",
        "parameters": [
          {
            "description": "Only what can be ordered in this datacenter.",
            "in": "query",
            "name": "datacenter",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Image"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Operating system images"
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "getOpenAPI",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 document."
          }
        },
        "security": [],
        "summary": "This document"
      }
    },
    "/plans": {
      "get": {
        "operationId": "listPlans",
        "parameters": [
          {
            "description": "Only what can be ordered in this datacenter.",
            "in": "query",
            "name": "datacenter",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Plan"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Plans for sale"
      }
    },
    "/servers": {
      "get": {
        "description": "Requires the `vps:view` permission.",
        "operationId": "listServers",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Server"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Your servers",
        "x-permission": "vps:view"
      },
      "post": {
        "description": "Requires the `vps:manage` permission.",
        "operationId": "createServer",
        "parameters": [
          {
            "description": "A repeat with the same key answers with the first order.",
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "maxLength": 64,
              "minLength": 8,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "billing_mode": {
                    "enum": [
                      "hourly",
                      "monthly"
                    ],
                    "type": "string"
                  },
                  "datacenter": {
                    "type": "string"
                  },
                  "hostname": {
                    "description": "RFC 1123 host name, unique among your live servers on its host.",
                    "maxLength": 253,
                    "type": "string"
                  },
                  "image": {
                    "description": "Image slug.",
                    "type": "string"
                  },
                  "password": {
                    "description": "8-128 printable ASCII characters with upper and lower case letters and a digit.",
                    "maxLength": 128,
                    "minLength": 8,
                    "type": "string"
                  },
                  "plan_id": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "project_id": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "required": [
                  "datacenter",
                  "plan_id",
                  "image",
                  "hostname",
                  "billing_mode"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "action": {
                      "$ref": "#/components/schemas/Action"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Server"
                    },
                    "password": {
                      "description": "The generated root password when none was sent, shown only here.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "action",
                    "password"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Accepted: follow the action. The server is metered from the moment it exists."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Order a server",
        "x-codes": [
          "insufficient_balance (402)",
          "identity_needed",
          "sold_out",
          "hostname_taken",
          "datacenter_closed",
          "not_for_sale",
          "core_unavailable"
        ],
        "x-permission": "vps:manage"
      }
    },
    "/servers/{id}": {
      "delete": {
        "description": "Requires the `vps:manage` permission.",
        "operationId": "terminateServer",
        "parameters": [
          {
            "description": "Server id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "reason": {
                    "description": "Why, as a short code (too_expensive, not_needed, ...).",
                    "pattern": "^[a-z][a-z_]{1,31}$",
                    "type": "string"
                  },
                  "reason_text": {
                    "maxLength": 500,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "action": {
                      "$ref": "#/components/schemas/Action"
                    }
                  },
                  "required": [
                    "action"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Delete the server and its disk. What it cost so far is settled by accounting",
        "x-codes": [
          "action_in_progress",
          "server_pending",
          "server_terminated"
        ],
        "x-permission": "vps:manage"
      },
      "get": {
        "description": "Requires the `vps:view` permission.",
        "operationId": "getServer",
        "parameters": [
          {
            "description": "Server id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Server"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "One server, with what its hypervisor can do",
        "x-permission": "vps:view"
      }
    },
    "/servers/{id}/actions": {
      "get": {
        "description": "Requires the `vps:view` permission.",
        "operationId": "listServerActions",
        "parameters": [
          {
            "description": "Server id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Action"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "The server's operations",
        "x-permission": "vps:view"
      }
    },
    "/servers/{id}/actions/{op}": {
      "post": {
        "description": "Requires the `vps:power:manage` permission.",
        "operationId": "serverOperation",
        "parameters": [
          {
            "description": "Server id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "op",
            "required": true,
            "schema": {
              "enum": [
                "start",
                "stop",
                "restart",
                "kill"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "action": {
                      "$ref": "#/components/schemas/Action"
                    }
                  },
                  "required": [
                    "action"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "start, stop (graceful), restart or kill (hard power-off)",
        "x-codes": [
          "feature_unavailable",
          "action_in_progress",
          "server_suspended",
          "server_pending"
        ],
        "x-permission": "vps:power:manage"
      }
    },
    "/servers/{id}/console": {
      "post": {
        "description": "Requires the `vps:console:access` permission.",
        "operationId": "getConsole",
        "parameters": [
          {
            "description": "Server id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "expires_in": {
                          "description": "Seconds.",
                          "format": "int64",
                          "type": "integer"
                        },
                        "url": {
                          "format": "uri",
                          "type": "string"
                        }
                      },
                      "required": [
                        "url",
                        "expires_in"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "A one-time browser console URL (VNC). Open it at once: it expires in expires_in seconds and works once; never store it",
        "x-codes": [
          "feature_unavailable",
          "server_suspended",
          "hypervisor_unavailable"
        ],
        "x-permission": "vps:console:access"
      }
    },
    "/servers/{id}/reinstall": {
      "post": {
        "description": "Requires the `vps:reinstall:manage` permission.",
        "operationId": "reinstallServer",
        "parameters": [
          {
            "description": "Server id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "image": {
                    "description": "Image slug.",
                    "type": "string"
                  },
                  "password": {
                    "description": "8-128 printable ASCII characters with upper and lower case letters and a digit.",
                    "maxLength": 128,
                    "minLength": 8,
                    "type": "string"
                  }
                },
                "required": [
                  "image"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "action": {
                      "$ref": "#/components/schemas/Action"
                    },
                    "password": {
                      "description": "The generated root password, shown only here; null when you chose it.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "action",
                    "password"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Accepted: follow the action. Never cached."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Reinstall from an image: the disk is wiped. Without a password one is generated and returned once in this answer",
        "x-codes": [
          "image_unavailable",
          "feature_unavailable",
          "action_in_progress",
          "rate_limit_exceeded",
          "reinstall_failed"
        ],
        "x-permission": "vps:reinstall:manage"
      }
    },
    "/servers/{id}/reset-password": {
      "post": {
        "description": "Requires the `vps:password:manage` permission.",
        "operationId": "resetServerPassword",
        "parameters": [
          {
            "description": "Server id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "password": {
                    "description": "8-128 printable ASCII characters with upper and lower case letters and a digit.",
                    "maxLength": 128,
                    "minLength": 8,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "action": {
                      "$ref": "#/components/schemas/Action"
                    },
                    "password": {
                      "description": "The generated root password, shown only here; null when you chose it.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "action",
                    "password"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Accepted: follow the action. Never cached."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Set the root password. Without one it is generated and returned once in this answer",
        "x-codes": [
          "feature_unavailable",
          "action_in_progress",
          "rate_limit_exceeded",
          "reset_password_failed"
        ],
        "x-permission": "vps:password:manage"
      }
    },
    "/servers/{id}/resize": {
      "post": {
        "description": "Requires the `vps:resize:manage` permission.",
        "operationId": "resizeServer",
        "parameters": [
          {
            "description": "Server id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "plan_id": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "required": [
                  "plan_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "action": {
                      "$ref": "#/components/schemas/Action"
                    }
                  },
                  "required": [
                    "action"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Move to another plan of the server's host. Disks only grow. The new plan is billed from the moment the host finished",
        "x-codes": [
          "insufficient_balance (402)",
          "same_plan",
          "plan_unavailable",
          "disk_cannot_shrink",
          "feature_unavailable",
          "action_in_progress",
          "rate_limit_exceeded",
          "resize_failed"
        ],
        "x-permission": "vps:resize:manage"
      }
    },
    "/servers/{id}/traffic": {
      "get": {
        "description": "Requires the `vps:view` permission.",
        "operationId": "getTraffic",
        "parameters": [
          {
            "description": "Server id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "from",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "granularity",
            "schema": {
              "enum": [
                "hour",
                "day"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Traffic"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Network traffic over a window (default: the current traffic period by day) and the quota of the current period",
        "x-codes": [
          "feature_unavailable",
          "invalid_input (window over 400 days)"
        ],
        "x-permission": "vps:view"
      }
    },
    "/servers/{id}/traffic-settings": {
      "put": {
        "description": "Requires the `vps:manage` permission.",
        "operationId": "setTrafficSettings",
        "parameters": [
          {
            "description": "Server id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "overage_billing": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "overage_billing"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Server"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "The traffic overage switch. Off: overage is never billed and the network is cut once the period's quota is used up, until the next period",
        "x-permission": "vps:manage"
      }
    }
  },
  "security": [
    {
      "session": []
    }
  ],
  "servers": [
    {
      "url": "https://api.ariaservice.net/vps/v1",
      "description": "API gateway (Arianet-Region header picks a regional install)"
    }
  ]
}
