{
  "openapi": "3.1.1",
  "info": {
    "title": "VpnHood! MANAGER",
    "description": "The REST API of VpnHood! MANAGER, the panel that runs VPN servers and gives out the access keys people connect with.\r\nThe panel is built on this API, so a script or a service can do anything it does: give access keys to your customers,\r\nadd and install servers, and read their usage. Every path is under `https://api.vpnhood.com`.\r\n\r\nThe guide [Call the MANAGER API](https://developer.vpnhood.com/manager-api/) goes from a key to a first request.\r\n\r\n## Sign in with a bot's API key\r\n\r\nA script signs in as a bot: a member of your project's team, with a role and an API key.\r\n\r\n1. In the panel, open **Settings**, select **Team**, then **Add Bot**, and name the bot.\r\n2. The panel shows the bot's key once, as the value of an `Authorization` header. Copy it.\r\n3. The bot joins as `ProjectReader`, which only reads. Open its page and give it the role its work needs:\r\n   `AccessTokenWriter` to give out access keys, `ProjectWriter` to manage servers too.\r\n\r\nSend the key with every request:\r\n\r\n```http\r\nAuthorization: Bearer <the bot's key>\r\n```\r\n\r\nEach operation says which permission it needs and which roles have it. A request without a valid key gets `401`, and\r\none whose role lacks the permission gets `403`. If a key leaks, reset it on the bot's page: the old one stops working\r\nat once.\r\n\r\n## Ids, lists and changes\r\n\r\n- `projectId` is the id in your project's address in the panel:\r\n  `https://console.vpnhood.com/projects/{projectId}/overview`. The other ids are the ones the API returns.\r\n- A list takes `recordIndex`, the first item to return, and `recordCount`, how many to return.\r\n- An update (`PATCH`) takes only the fields to change, each as `{ \"value\": ... }`. A field left out keeps its value.\r\n- Times are in UTC, in ISO 8601.\r\n\r\n## Errors\r\n\r\nAn error has a status code and a JSON body, whose `TypeName` names the error and `Message` says what went wrong:\r\n\r\n```json\r\n{ \"TypeName\": \"NotExistsException\", \"Message\": \"...\" }\r\n```\r\n\r\n`404` means not found, `409` already exists, and `400` any other request the API refuses.",
    "version": "4.0.466"
  },
  "servers": [
    {
      "url": "https://api.vpnhood.com"
    }
  ],
  "paths": {
    "/api/projects/{projectId}/accesses/{accessId}": {
      "get": {
        "tags": [
          "Accesses"
        ],
        "summary": "Get a VPN user",
        "description": "With its access key and device. The key's premium and management codes are null unless the caller may read\naccess keys (`AccessTokenReadAccessKey`).\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessId",
            "in": "path",
            "description": "The VPN user's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The VPN user, with its access key and device.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessData"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/accesses": {
      "get": {
        "tags": [
          "Accesses"
        ],
        "summary": "List VPN users",
        "description": "Most total traffic first, each with its access key and device. The keys' premium and management codes are null\nunless the caller may read access keys (`AccessTokenReadAccessKey`).\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessTokenId",
            "in": "query",
            "description": "The id of an access key, to list its VPN users alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "query",
            "description": "The id of a server farm, to list the VPN users of its keys alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessId",
            "in": "query",
            "description": "The id of a VPN user, to list it alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "beginTime",
            "in": "query",
            "description": "A time in UTC, to list the VPN users created at or after it alone.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endTime",
            "in": "query",
            "description": "A time in UTC, to list the VPN users created at or before it alone.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "recordIndex",
            "in": "query",
            "description": "The first VPN user to return, counted from 0.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "recordCount",
            "in": "query",
            "description": "How many VPN users to return.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 300
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of the VPN users, and how many match in all.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResultOfAccessData"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/access-token-groups": {
      "post": {
        "tags": [
          "AccessTokenGroups"
        ],
        "summary": "Create an access key group",
        "description": "The free plan holds 2,000 groups; one more fails with `QuotaException`.\n\n**Access:** the `ProjectWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The group to create.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessTokenGroupCreateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The new group.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessTokenGroup"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "get": {
        "tags": [
          "AccessTokenGroups"
        ],
        "summary": "List access key groups",
        "description": "Newest first, without their key counts.\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Text to look for at the start of a group's name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recordIndex",
            "in": "query",
            "description": "The first group to return, counted from 0.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "recordCount",
            "in": "query",
            "description": "How many groups to return.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 51
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The access key groups.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccessTokenGroup"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/access-token-groups/{accessTokenGroupId}": {
      "patch": {
        "tags": [
          "AccessTokenGroups"
        ],
        "summary": "Update an access key group",
        "description": "**Access:** the `AccessTokenWrite` permission, which `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessTokenGroupId",
            "in": "path",
            "description": "The access key group's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessTokenGroupUpdateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The group as it is now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessTokenGroup"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "get": {
        "tags": [
          "AccessTokenGroups"
        ],
        "summary": "Get an access key group",
        "description": "**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessTokenGroupId",
            "in": "path",
            "description": "The access key group's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeAccessTokenSummary",
            "in": "query",
            "description": "Whether to count its keys: active, inactive and unused.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The access key group.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessTokenGroup"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "AccessTokenGroups"
        ],
        "summary": "Delete an access key group",
        "description": "Its access keys are deleted with it, and their apps can no longer connect, unless\n`replacementAccessTokenGroupId` names a group to move them to.\n\n**Access:** the `AccessTokenWrite` permission, which `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessTokenGroupId",
            "in": "path",
            "description": "The access key group's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "replacementAccessTokenGroupId",
            "in": "query",
            "description": "The id of a group to move its keys to; leave it out to delete them.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/access-token-profiles": {
      "post": {
        "tags": [
          "AccessTokenProfiles"
        ],
        "summary": "Create an access key profile",
        "description": "The new profile is enabled. The free plan holds 10 profiles; one more fails with `QuotaException`.\n\n**Access:** the `AccessTokenWrite` permission, which `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The profile to create.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessTokenProfileCreateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The new profile.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessTokenProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "get": {
        "tags": [
          "AccessTokenProfiles"
        ],
        "summary": "List access key profiles",
        "description": "In name order, without their key counts.\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Text to look for at the start of a profile's name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recordIndex",
            "in": "query",
            "description": "The first profile to return, counted from 0.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "recordCount",
            "in": "query",
            "description": "How many profiles to return.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 51
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The access key profiles.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccessTokenProfile"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/access-token-profiles/{accessTokenProfileId}": {
      "patch": {
        "tags": [
          "AccessTokenProfiles"
        ],
        "summary": "Update an access key profile",
        "description": "A change applies from its keys' next connects. Disabling the profile, or a traffic limit their use has passed,\nalso ends their open sessions at their server's next usage report.\n\n**Access:** the `AccessTokenWrite` permission, which `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessTokenProfileId",
            "in": "path",
            "description": "The access key profile's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessTokenProfileUpdateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The profile as it is now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessTokenProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "get": {
        "tags": [
          "AccessTokenProfiles"
        ],
        "summary": "Get an access key profile",
        "description": "**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessTokenProfileId",
            "in": "path",
            "description": "The access key profile's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeAccessTokenSummary",
            "in": "query",
            "description": "Whether to count its keys: active, inactive and unused.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The access key profile.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessTokenProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "AccessTokenProfiles"
        ],
        "summary": "Delete an access key profile",
        "description": "Its access keys are deleted with it, and their apps can no longer connect, unless\n`replacementAccessTokenProfileId` names a profile to move them to.\n\n**Access:** the `AccessTokenWrite` permission, which `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessTokenProfileId",
            "in": "path",
            "description": "The access key profile's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "replacementAccessTokenProfileId",
            "in": "query",
            "description": "The id of a profile to move its keys to; leave it out to delete them.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/access-tokens": {
      "post": {
        "tags": [
          "AccessTokens"
        ],
        "summary": "Create access keys",
        "description": "Makes `count` keys alike, each with the next support code. The free plan holds 2,000 keys and the unlimited\nplan 100,000, at most 10,000 a request; more fails with `QuotaException`. The keys come without their\n`accessKey`: get it from `GET .../access-tokens/{accessTokenId}/access-key`.\n\n**Access:** the `AccessTokenWrite` permission, which `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The access keys to create.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessTokenCreateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The new access keys.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccessToken"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "get": {
        "tags": [
          "AccessTokens"
        ],
        "summary": "List access keys",
        "description": "Newest first. With `usageBeginTime`, each comes with its usage in the period, which the free plan allows\nup to 33 days long and the unlimited plan up to 198; a longer period fails with `QuotaException`. Premium\nand management codes are null, and `includeAccessKey` is refused, unless the caller may read access keys\n(`AccessTokenReadAccessKey`).\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Text to look for: a key's id or support code, its server farm's id, or the start of its name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessTokenId",
            "in": "query",
            "description": "The id of an access key, to list it alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessTokenProfileId",
            "in": "query",
            "description": "The id of an access key profile, to list its keys alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "query",
            "description": "The id of a server farm, to list its keys and their usage there alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessTokenGroupId",
            "in": "query",
            "description": "The id of an access key group, to list its keys alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customerId",
            "in": "query",
            "description": "A customer id, to list its keys alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "description": "An order id, to list its keys alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopId",
            "in": "query",
            "description": "A shop id, to list its keys alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeAccessKey",
            "in": "query",
            "description": "Whether to fill each key's `accessKey`, the text a user pastes into the app.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "includeAccessTokenProfile",
            "in": "query",
            "description": "Whether to include each key's access key profile.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "usageBeginTime",
            "in": "query",
            "description": "The start of the period to count usage in, in UTC; no usage when left out.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "usageEndTime",
            "in": "query",
            "description": "The end of that period, in UTC; now when left out.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "recordIndex",
            "in": "query",
            "description": "The first key to return, counted from 0.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "recordCount",
            "in": "query",
            "description": "How many keys to return.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 51
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of the access keys, and how many match in all.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResultOfAccessTokenData"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "AccessTokens"
        ],
        "summary": "Delete access keys",
        "description": "Their apps can no longer connect, and their open sessions end at their server's next usage report. An id that\nnames no key of the project is skipped.\n\n**Access:** the `AccessTokenWrite` permission, which `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The ids of the access keys to delete.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/access-tokens/{accessTokenId}": {
      "patch": {
        "tags": [
          "AccessTokens"
        ],
        "summary": "Update an access key",
        "description": "A change applies from the key's next connect; a disabled or expired key's open sessions end at their server's\nnext usage report. `maxCycleTrafficMb` and `maxTotalTrafficMb` are for a key with a private profile\nonly.\n\n**Access:** the `AccessTokenWrite` permission, which `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessTokenId",
            "in": "path",
            "description": "The access key's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessTokenUpdateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "get": {
        "tags": [
          "AccessTokens"
        ],
        "summary": "Get an access key",
        "description": "With its profile, and with its usage when `usageBeginTime` is given; the usage is left out while it can't\nbe read. Its premium and management codes are null unless the caller may read access keys\n(`AccessTokenReadAccessKey`).\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessTokenId",
            "in": "path",
            "description": "The access key's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "usageBeginTime",
            "in": "query",
            "description": "The start of the period to count usage in, in UTC; no usage when left out.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "usageEndTime",
            "in": "query",
            "description": "The end of that period, in UTC; now when left out.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The access key, with its profile and usage.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessTokenData"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "AccessTokens"
        ],
        "summary": "Delete an access key",
        "description": "Its apps can no longer connect, and its open sessions end at their server's next usage report. An id that names\nno key of the project is not an error.\n\n**Access:** the `AccessTokenWrite` permission, which `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessTokenId",
            "in": "path",
            "description": "The access key's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/access-tokens/{accessTokenId}/access-key": {
      "get": {
        "tags": [
          "AccessTokens"
        ],
        "summary": "Get the key to paste into the app",
        "description": "The access key itself, as a JSON string that starts with `vh:`: it carries the servers of the key's server\nfarm, the key's name, tags and support code, and its profile's client policies. It fails with 400 while that\nfarm has no server to put in it.\n\n**Access:** the `AccessTokenReadAccessKey` permission, which `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessTokenId",
            "in": "path",
            "description": "The access key's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The access key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/access-tokens/export-csv": {
      "get": {
        "tags": [
          "AccessTokens"
        ],
        "summary": "Export access keys as CSV",
        "description": "The keys the list gives for the same filters, a row each: support code, name, premium code, management code, id,\nserver farm, group, profile and, with `includeAccessKey`, the access key. It holds 51 keys unless\n`recordCount` says more. The codes are empty, and `includeAccessKey` is refused, unless the caller may\nread access keys (`AccessTokenReadAccessKey`).\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Text to look for: a key's id or support code, its server farm's id, or the start of its name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessTokenId",
            "in": "query",
            "description": "The id of an access key, to export it alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessTokenProfileId",
            "in": "query",
            "description": "The id of an access key profile, to export its keys alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "query",
            "description": "The id of a server farm, to export its keys alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessTokenGroupId",
            "in": "query",
            "description": "The id of an access key group, to export its keys alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customerId",
            "in": "query",
            "description": "A customer id, to export its keys alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "description": "An order id, to export its keys alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopId",
            "in": "query",
            "description": "A shop id, to export its keys alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeAccessKey",
            "in": "query",
            "description": "Whether to add each key's access key, the text users paste into the app.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "usageBeginTime",
            "in": "query",
            "description": "Not used: the file holds no usage.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "usageEndTime",
            "in": "query",
            "description": "Not used: the file holds no usage.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "recordIndex",
            "in": "query",
            "description": "The first key to export, counted from 0.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "recordCount",
            "in": "query",
            "description": "How many keys to export.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 51
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The CSV file, `access-tokens.csv`, or `access-tokens-{group}.csv` when all its keys are in one group."
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/access-tokens/managementCode:{managementCode}": {
      "get": {
        "tags": [
          "AccessTokens"
        ],
        "summary": "Get a key by management code",
        "description": "For whoever holds the key's management code, with no API key: the key's use, its limits, and whether the code\nmay still disable it. An unknown code gets 404.\n\n**Access:** takes no API key.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "managementCode",
            "in": "path",
            "description": "The key's management code; dashes and spaces in it are ignored.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A brief of the access key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessTokenBrief"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/projects/{projectId}/access-tokens/managementCode:{managementCode}/disable": {
      "post": {
        "tags": [
          "AccessTokens"
        ],
        "summary": "Disable a key by management code",
        "description": "For whoever holds the key's management code, with no API key. It works until 3 days after the key's first\nconnect, as `canDisable` tells, and fails with 400 after that; the code can't enable the key again. The\nkey's open sessions end at their server's next usage report.\n\n**Access:** takes no API key.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "managementCode",
            "in": "path",
            "description": "The key's management code; dashes and spaces in it are ignored.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": []
      }
    },
    "/api/projects/{projectId}/server-farms/{serverFarmId}/Create": {
      "post": {
        "tags": [
          "Certificates"
        ],
        "summary": "Create a certificate",
        "description": "Makes a self-signed certificate for the farm; a wildcard domain is refused. One for a domain the farm already\nhas replaces that one, keeping its visibility if that was higher. With `AutoSign`, the MANAGER then asks\nLet's Encrypt to sign it. The farm's servers take it within about a minute, unless it is `DomainOnly`. The\nfree plan holds up to 25 certificates; one more fails with `QuotaException`, unless it replaces one.\n\n**Access:** the `CertificateWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "path",
            "description": "The id of the server farm it is for.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The certificate to create.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CertificateCreateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The new certificate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Certificate"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/server-farms/{serverFarmId}/upload": {
      "post": {
        "tags": [
          "Certificates"
        ],
        "summary": "Upload a certificate",
        "description": "Takes a certificate you got elsewhere; a wildcard one is refused. It is CA signed when the MANAGER can verify\nwho signed it. One for a domain the farm already has replaces that one, keeping its visibility if that was\nhigher. The farm's servers take it within about a minute. The free plan holds up to 25 certificates; one more\nfails with `QuotaException`, unless it replaces one.\n\n**Access:** the `CertificateWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "path",
            "description": "The id of the server farm it is for.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The certificate file and its settings.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CertificateUploadParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The uploaded certificate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Certificate"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/certificates/{certificateId}": {
      "get": {
        "tags": [
          "Certificates"
        ],
        "summary": "Get a certificate",
        "description": "**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "certificateId",
            "in": "path",
            "description": "The certificate's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The certificate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Certificate"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Certificates"
        ],
        "summary": "Update a certificate",
        "description": "A new visibility, signing or server reaches the farm's servers within about a minute. The certificate in the\nkeys must stay the whole farm's, and the farm must keep one in its keys.\n\n**Access:** the `CertificateWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "certificateId",
            "in": "path",
            "description": "The certificate's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CertificateUpdateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The certificate as it is now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Certificate"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Certificates"
        ],
        "summary": "Delete a certificate",
        "description": "The certificate in the farm's keys can't be deleted, nor the farm's last certificate that every server uses and\nis not `DomainOnly`: give `PublicInToken` to another certificate, or add one, first.\n\n**Access:** the `CertificateWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "certificateId",
            "in": "path",
            "description": "The certificate's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/certificates": {
      "get": {
        "tags": [
          "Certificates"
        ],
        "summary": "List certificates",
        "description": "All the project's certificates, or one farm's or one server's, newest first.\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "query",
            "description": "The id of a server farm, to list its certificates alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverId",
            "in": "query",
            "description": "The id of a server, to list the certificates it uses alone.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The certificates.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Certificate"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/client-filters": {
      "post": {
        "tags": [
          "ClientFilters"
        ],
        "summary": "Create a client filter",
        "description": "A filter that can't be read is refused. The free plan holds up to 5 client filters; one more fails with\n`QuotaException`.\n\n**Access:** the `ProjectWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The client filter to create.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientFilterCreateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The new client filter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFilter"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "get": {
        "tags": [
          "ClientFilters"
        ],
        "summary": "List client filters",
        "description": "**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "All the project's client filters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ClientFilter"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/client-filters/{clientFilterId}": {
      "get": {
        "tags": [
          "ClientFilters"
        ],
        "summary": "Get a client filter",
        "description": "**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientFilterId",
            "in": "path",
            "description": "The client filter's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The client filter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFilter"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "ClientFilters"
        ],
        "summary": "Update a client filter",
        "description": "A new filter applies to the next connections; the sessions already open go on.\n\n**Access:** the `ProjectWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientFilterId",
            "in": "path",
            "description": "The client filter's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientFilterUpdateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The client filter as it is now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFilter"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "ClientFilters"
        ],
        "summary": "Delete a client filter",
        "description": "One that a server still has, a deleted server too, can't be deleted.\n\n**Access:** the `ProjectWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientFilterId",
            "in": "path",
            "description": "The client filter's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/devices/{deviceId}": {
      "get": {
        "tags": [
          "Devices"
        ],
        "summary": "Get a device",
        "description": "With its traffic when `usageBeginTime` is given; the usage is left out while it can't be read.\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "deviceId",
            "in": "path",
            "description": "The device's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "usageBeginTime",
            "in": "query",
            "description": "The start of the period to count usage in, in UTC; no usage when left out.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "usageEndTime",
            "in": "query",
            "description": "The end of that period, in UTC; now when left out.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The device, with its usage.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceData"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Devices"
        ],
        "summary": "Update a device",
        "description": "Locking it refuses its next connects, with any of the project's keys, and leaves its open sessions on. Locking\nit again keeps the first lock's time.\n\n**Access:** the `ProjectWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "deviceId",
            "in": "path",
            "description": "The device's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceUpdateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The device as it is now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Device"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/devices/clientId": {
      "get": {
        "tags": [
          "Devices"
        ],
        "summary": "Get a device by its client id",
        "description": "**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientId",
            "in": "query",
            "description": "The client id the device's app made for it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The device.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Device"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/devices": {
      "get": {
        "tags": [
          "Devices"
        ],
        "summary": "List devices",
        "description": "Last connected first. With `usageBeginTime`, each comes with its traffic in the period, which the free plan\nallows up to 33 days long and the unlimited plan up to 198; a longer period fails with `QuotaException`.\nThe usage is left out while it can't be read.\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "deviceId",
            "in": "query",
            "description": "The id of a device, to list it alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "usageBeginTime",
            "in": "query",
            "description": "The start of the period to count usage in, in UTC; no usage when left out.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "usageEndTime",
            "in": "query",
            "description": "The end of that period, in UTC; now when left out.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "recordIndex",
            "in": "query",
            "description": "The first device to return, counted from 0.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "recordCount",
            "in": "query",
            "description": "How many devices to return.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The devices.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeviceData"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/devices/usages": {
      "get": {
        "tags": [
          "Devices"
        ],
        "summary": "List devices by traffic",
        "description": "The devices last connected within the period that moved traffic in it, most traffic first. The free plan allows\na period up to 33 days long and the unlimited plan up to 198; a longer period fails with `QuotaException`.\nWhile usage can't be read, the call fails with 503.\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessTokenId",
            "in": "query",
            "description": "The id of an access key, to count the traffic through it alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "query",
            "description": "The id of a server farm, to count the traffic through its servers alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "usageBeginTime",
            "in": "query",
            "description": "The start of the period to count usage in, in UTC; the list is empty without it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "usageEndTime",
            "in": "query",
            "description": "The end of that period, in UTC; now when left out.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "recordIndex",
            "in": "query",
            "description": "The first device to return, counted from 0.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "recordCount",
            "in": "query",
            "description": "How many devices to return.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The devices, each with its traffic in the period.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeviceData"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/server-farms/{serverFarmId}/farm-token-repos": {
      "post": {
        "tags": [
          "FarmTokenRepos"
        ],
        "summary": "Add an update URL",
        "description": "The URL goes into the farm's connection details: access keys copied from then on carry it, and apps holding an\nolder key get it through push updates to clients. With upload settings, the MANAGER uploads the file at once and\nafter every change. A farm holds up to 10 update URLs; one more fails with `QuotaException`.\n\n**Access:** the `ServerFarmWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "path",
            "description": "The server farm's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The update URL to add.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FarmTokenRepoCreateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The new update URL, with its upload settings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FarmTokenRepo"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "get": {
        "tags": [
          "FarmTokenRepos"
        ],
        "summary": "List update URLs",
        "description": "Sorted by name. A caller who may not change the farm (`ServerFarmWrite`) gets the upload settings without\nwhat signs in to the storage, and an upload's error only as \"The upload failed.\"\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "path",
            "description": "The server farm's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "checkStatus",
            "in": "query",
            "description": "Whether to read each URL now, as an app would, to fill `isUpToDate`; that takes a moment per URL.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The farm's update URLs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FarmTokenRepo"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/server-farms/{serverFarmId}/farm-token-repos/Summary": {
      "get": {
        "tags": [
          "FarmTokenRepos"
        ],
        "summary": "Check update URLs",
        "description": "Reads each URL now, as an app would, and sorts the URLs by whether they hold the farm's current connection\ndetails.\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "path",
            "description": "The server farm's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The names of the up-to-date and the outdated update URLs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FarmTokenRepoSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/server-farms/{serverFarmId}/farm-token-repos/{farmTokenRepoId}": {
      "get": {
        "tags": [
          "FarmTokenRepos"
        ],
        "summary": "Get an update URL",
        "description": "A caller who may not change the farm (`ServerFarmWrite`) gets the upload settings without what signs in to\nthe storage, and an upload's error only as \"The upload failed.\"\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "path",
            "description": "The server farm's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "farmTokenRepoId",
            "in": "path",
            "description": "The update URL's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "checkStatus",
            "in": "query",
            "description": "Whether to read the URL now, as an app would, to fill `isUpToDate`.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The update URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FarmTokenRepo"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "FarmTokenRepos"
        ],
        "summary": "Change an update URL",
        "description": "A URL with upload settings is uploaded to again right after. A new `publishUrl` goes into the farm's\nconnection details, as on create.\n\n**Access:** the `ServerFarmWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "path",
            "description": "The server farm's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "farmTokenRepoId",
            "in": "path",
            "description": "The update URL's id.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "The fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FarmTokenRepoUpdateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The update URL as it is now, with its upload settings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FarmTokenRepo"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "FarmTokenRepos"
        ],
        "summary": "Delete an update URL",
        "description": "The URL leaves the farm's connection details, and the MANAGER uploads there no more; the file stays as it is.\n\n**Access:** the `ServerFarmWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "path",
            "description": "The server farm's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "farmTokenRepoId",
            "in": "path",
            "description": "The update URL's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/server-farms/{serverFarmId}/farm-token-repos/push": {
      "post": {
        "tags": [
          "FarmTokenRepos"
        ],
        "summary": "Upload to update URLs again",
        "description": "The MANAGER uploads the farm's connection details again, in the background, to each of its update URLs that has\nupload settings; their `uploadedTime` and `error` show how it went.\n\n**Access:** the `ServerFarmWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "path",
            "description": "The server farm's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/health/{check}": {
      "get": {
        "tags": [
          "Health"
        ],
        "summary": "Check that the service answers",
        "description": "It answers after 3 seconds, with the text it was given.\n\n**Access:** takes no API key.",
        "parameters": [
          {
            "name": "check",
            "in": "path",
            "description": "Any text, which the answer repeats.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The text given in `check`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/projects/{projectId}/host-orders/sync": {
      "post": {
        "tags": [
          "HostOrders"
        ],
        "summary": "Sync with the hosting providers",
        "description": "Reads the IPs at the project's hosting providers. An order whose IP has arrived completes and releases the IP it\nreplaces, one with no IP after a day fails, and a released IP the provider has deleted leaves its server. The\nlists do it too when the last sync is over a minute old; a call while one runs returns at once.\n\n**Access:** the `ProjectWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/host-orders/ips/{ipAddress}": {
      "get": {
        "tags": [
          "HostOrders"
        ],
        "summary": "Get a host IP",
        "description": "It is read again from its provider first. An IP that no server of the project uses or is routed to is not\nfound.\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ipAddress",
            "in": "path",
            "description": "The IP address, written as the list shows it.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The host IP.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostIp"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "HostOrders"
        ],
        "summary": "Release a host IP",
        "description": "Asks the provider to delete the IP when its paid time ends; until then the IP serves, and `cancel-release`\nkeeps it. Once the provider has deleted it, it leaves its server.\n\n**Access:** the `ProjectWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ipAddress",
            "in": "path",
            "description": "The IP address, written as the list shows it.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ignoreProviderError",
            "in": "query",
            "description": "Whether to mark the IP as releasing even when the provider fails the request; then end it at the provider\nyourself.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "HostOrders"
        ],
        "summary": "Update a host IP",
        "description": "A new `providerDescription` is set at the provider too.\n\n**Access:** the `ProjectWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ipAddress",
            "in": "path",
            "description": "The IP address, written as the list shows it.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostIpUpdateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/host-orders/ips": {
      "get": {
        "tags": [
          "HostOrders"
        ],
        "summary": "List host IPs",
        "description": "The IPs the project's servers use, and the ones routed to them at the provider, the hidden ones last. It syncs\nwith the providers first when the last sync is over a minute old.\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "An IP address to find, written in full.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "isAdditional",
            "in": "query",
            "description": "`true` for the additional IPs only, `false` for the primary ones.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "isHidden",
            "in": "query",
            "description": "`true` for the hidden IPs only, `false` for the others.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "hostIpStatus",
            "in": "query",
            "description": "The one state to list; every state when left out.",
            "schema": {
              "$ref": "#/components/schemas/HostIpStatus"
            }
          },
          {
            "name": "includeIpV4",
            "in": "query",
            "description": "Whether to list the IPv4 addresses.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "includeIpV6",
            "in": "query",
            "description": "Whether to list the IPv6 addresses.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "includeInUse",
            "in": "query",
            "description": "Ignored; filter with `hostIpStatus`.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "includeNotInUse",
            "in": "query",
            "description": "Ignored; filter with `hostIpStatus`.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "forceSync",
            "in": "query",
            "description": "Whether to sync with the providers first, however recent the last sync; with it, a caller who may not change\nthe project (`ProjectWrite`) gets 403.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "recordIndex",
            "in": "query",
            "description": "The first item to return, counted from 0.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "recordCount",
            "in": "query",
            "description": "How many items to return.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The host IPs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HostIp"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/host-orders/ips/{ipAddress}/cancel-release": {
      "post": {
        "tags": [
          "HostOrders"
        ],
        "summary": "Cancel a host IP's release",
        "description": "The provider keeps the IP and renews it again. An IP that a new one replaced is kept too.\n\n**Access:** the `ProjectWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ipAddress",
            "in": "path",
            "description": "The IP address, written as the list shows it.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/host-orders/order-new-ip": {
      "post": {
        "tags": [
          "HostOrders"
        ],
        "summary": "Order a new IP for a server",
        "description": "The server's hosting provider, the one its `hostPanelUrl` is on, routes a new IP to it. Once the IP\narrives, it joins the server's access points, the server's `autoConfigure` turns off, and\n`oldIpAddress` is released; with no IP after a day, the order fails. Ordering again while the server's\norder is pending returns that order, and an order the provider refuses fails the call and is kept as failed.\n\n**Access:** the `ProjectWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The server, and the IP to replace if any.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostOrderNewIp"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The order, pending until its IP arrives.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostOrder"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/host-orders": {
      "get": {
        "tags": [
          "HostOrders"
        ],
        "summary": "List host orders",
        "description": "The newest first. It syncs with the providers first when the last sync is over a minute old.\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "An IP address an order delivered, written in full.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recordIndex",
            "in": "query",
            "description": "The first item to return, counted from 0.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "recordCount",
            "in": "query",
            "description": "How many items to return.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The host orders.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HostOrder"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/host-orders/{orderId}": {
      "get": {
        "tags": [
          "HostOrders"
        ],
        "summary": "Get a host order",
        "description": "**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "path",
            "description": "The order's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The host order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostOrder"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/ip-locks": {
      "post": {
        "tags": [
          "IpLocks"
        ],
        "summary": "Add a locked IP",
        "description": "The lock applies to the next connections; the sessions already open go on. An IP already in the list is\nrefused.\n\n**Access:** the `IpLockWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The IP to add, and whether to lock it.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IpLockCreateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The locked IP.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IpLock"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "get": {
        "tags": [
          "IpLocks"
        ],
        "summary": "List locked IPs",
        "description": "The earliest locked first, and the IPs listed without a lock last.\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Text to look for in the IP addresses.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recordIndex",
            "in": "query",
            "description": "The first item to return, counted from 0.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "recordCount",
            "in": "query",
            "description": "How many items to return.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 300
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The locked IPs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/IpLock"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/ip-locks/{ip}": {
      "patch": {
        "tags": [
          "IpLocks"
        ],
        "summary": "Update a locked IP",
        "description": "`isLocked` `true` on an IP that is already locked unlocks it, as `false` does; leave it out to\nchange only the note.\n\n**Access:** the `IpLockWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ip",
            "in": "path",
            "description": "The IP address, written as the list shows it.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IpLockUpdateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The locked IP as it is now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IpLock"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "IpLocks"
        ],
        "summary": "Delete a locked IP",
        "description": "Devices from the IP are no longer refused, from their next connection.\n\n**Access:** the `IpLockWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ip",
            "in": "path",
            "description": "The IP address, written as the list shows it.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "get": {
        "tags": [
          "IpLocks"
        ],
        "summary": "Get a locked IP",
        "description": "**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ip",
            "in": "path",
            "description": "The IP address, written as the list shows it.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The locked IP.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IpLock"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/password-authentication/signin": {
      "post": {
        "tags": [
          "PasswordAuthentication"
        ],
        "summary": "Sign in with email and password",
        "description": "A wrong email or password fails with `InvalidCredential`. The id token comes whether or not the email is\nverified, and `isEmailVerified` tells: until it is, `POST /api/authentication/signin` refuses the\ntoken.\n\n**Access:** takes no API key.",
        "requestBody": {
          "description": "The account's email and password.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordSignInParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The account's id token, and whether its email is verified.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasswordSignInResult"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/password-authentication/accounts": {
      "post": {
        "tags": [
          "PasswordAuthentication"
        ],
        "summary": "Create an account",
        "description": "It sends the account's verification email, whose link opens the panel. An email that already has an account\nfails with `EmailInUse`.\n\n**Access:** takes no API key.",
        "requestBody": {
          "description": "The new account's email and password, and where the email's link leads.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordAccountParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The new account's id token, whose email is not verified yet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasswordSignInResult"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/password-authentication/verification-email": {
      "post": {
        "tags": [
          "PasswordAuthentication"
        ],
        "summary": "Send the verification email again",
        "description": "It takes the account's password, so only its owner can ask.\n\n**Access:** takes no API key.",
        "requestBody": {
          "description": "The account's email and password, and where the email's link leads.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordAccountParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": []
      }
    },
    "/api/password-authentication/verify-email": {
      "post": {
        "tags": [
          "PasswordAuthentication"
        ],
        "summary": "Verify an email",
        "description": "A code that is used or out of date fails with `InvalidLink`.\n\n**Access:** takes no API key.",
        "requestBody": {
          "description": "The code from the verification email's link.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailVerifyParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": []
      }
    },
    "/api/password-authentication/password-reset-email": {
      "post": {
        "tags": [
          "PasswordAuthentication"
        ],
        "summary": "Send a password reset email",
        "description": "An address with no account gets the same answer, but no email.\n\n**Access:** takes no API key.",
        "requestBody": {
          "description": "The account's email, and where the email's link leads.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordResetEmailParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": []
      }
    },
    "/api/password-authentication/reset-password": {
      "post": {
        "tags": [
          "PasswordAuthentication"
        ],
        "summary": "Set a new password",
        "description": "A code that is used or out of date fails with `InvalidLink`.\n\n**Access:** takes no API key.",
        "requestBody": {
          "description": "The code from the reset email's link, and the new password.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordResetParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": []
      }
    },
    "/api/projects": {
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Create a project",
        "description": "The caller becomes its owner. A new project starts with a server farm, its server profile and certificate, a\npublic and a private access key profile, and an access key of each.\n\n**Access:** any signed-in user or bot.",
        "responses": {
          "200": {
            "description": "The new project, with its secrets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "List all projects",
        "description": "Every project of the service, newest first. To list your own, use `GET /api/team/users/current/projects`.\n\n**Access:** the `ProjectList` permission, which only the service's administrator has.",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "description": "A name or a project id to look for.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recordIndex",
            "in": "query",
            "description": "The first project to return, counted from 0.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "recordCount",
            "in": "query",
            "description": "How many projects to return.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 101
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The projects, without their secrets.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Project"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Get a project",
        "description": "Its secrets are shown only to a caller who may change the project (`ProjectWrite`).\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Projects"
        ],
        "summary": "Update a project",
        "description": "**Access:** the `ProjectWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectUpdateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The project as it is now, with its secrets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Projects"
        ],
        "summary": "Delete a project",
        "description": "Its records are removed 30 days later.\n\n**Access:** the `ProjectDelete` permission, which no role has.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/report/usage": {
      "get": {
        "tags": [
          "Report"
        ],
        "summary": "Get the usage",
        "description": "The traffic and devices of the whole project, or of the server farm, server or device given: a server overrides\na farm, and a device can't be given with either. The free plan reports on up to 33 days and the unlimited plan\non up to 198; a longer period fails with `QuotaException`.\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "usageBeginTime",
            "in": "query",
            "description": "The start of the period to count usage in, in UTC; required.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "usageEndTime",
            "in": "query",
            "description": "The end of that period, in UTC; now when left out.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "serverFarmId",
            "in": "query",
            "description": "The id of a server farm, to count its usage alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverId",
            "in": "query",
            "description": "The id of a server, to count its usage alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "deviceId",
            "in": "query",
            "description": "The id of a device, to count its usage alone.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The usage in that period.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/report/server-status-history": {
      "get": {
        "tags": [
          "Report"
        ],
        "summary": "Get the servers' load over time",
        "description": "The period in about 12 equal steps, 25 minutes at least, each with the peak of the servers together; the last 7\nminutes are left out, as not every server has reported them yet. The free plan reports on up to 33 days and the\nunlimited plan on up to 198; a longer period fails with `QuotaException`.\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "usageBeginTime",
            "in": "query",
            "description": "The start of the period to count usage in, in UTC; required.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "usageEndTime",
            "in": "query",
            "description": "The end of that period, in UTC; now when left out.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "serverFarmId",
            "in": "query",
            "description": "The id of a server farm, to show its servers alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverId",
            "in": "query",
            "description": "The id of a server, to show it alone, with its CPU use and available memory.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One item per step, the earliest first.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ServerStatusHistory"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/report/countries-usage": {
      "get": {
        "tags": [
          "Report"
        ],
        "summary": "Get the devices by country",
        "description": "How many devices used the VPN from each country in the period. The free plan reports on up to 33 days and the\nunlimited plan on up to 198; a longer period fails with `QuotaException`.\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "usageBeginTime",
            "in": "query",
            "description": "The start of the period to count usage in, in UTC; required.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "usageEndTime",
            "in": "query",
            "description": "The end of that period, in UTC; now when left out.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "serverFarmId",
            "in": "query",
            "description": "The id of a server farm, to count its devices alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverId",
            "in": "query",
            "description": "The id of a server, to count its devices alone.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The countries, the one with the most devices first.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CountryUsage"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/server-farms": {
      "post": {
        "tags": [
          "ServerFarms"
        ],
        "summary": "Create a server farm",
        "description": "A new farm has a secret of its own, push updates to clients on, and a self-signed certificate with a made-up\nname in its keys. Its access keys can't be read until one of its servers is installed, as they carry the\nservers' addresses. The free plan holds up to 5 farms; one more fails with `QuotaException`, and a name\nanother farm has fails with 409.\n\n**Access:** the `ServerFarmWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The server farm to create; leave it out for the defaults.",
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ServerFarmCreateParams"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new server farm, with its secret.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerFarmData"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "get": {
        "tags": [
          "ServerFarms"
        ],
        "summary": "List server farms",
        "description": "Sorted by name in descending order. Each farm's secret is null for a caller who may not read access keys\n(`AccessTokenReadAccessKey`).\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Text to look for in a farm's name, or a farm's id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeSummary",
            "in": "query",
            "description": "Whether to count each farm's servers and access keys.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "recordIndex",
            "in": "query",
            "description": "The first farm to return, counted from 0.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "recordCount",
            "in": "query",
            "description": "How many farms to return.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 101
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The server farms.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ServerFarmSummary"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/server-farms/{serverFarmId}": {
      "patch": {
        "tags": [
          "ServerFarms"
        ],
        "summary": "Update a server farm",
        "description": "A new server profile or secret reaches the farm's servers at their next status report, within about a minute.\nAccess keys copied before a new secret stop working in current apps, so give your users new ones. A name another\nfarm has fails with 409.\n\n**Access:** the `ServerFarmWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "path",
            "description": "The server farm's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServerFarmUpdateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The server farm as it is now, with its secret.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerFarmData"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "get": {
        "tags": [
          "ServerFarms"
        ],
        "summary": "Get a server farm",
        "description": "Its secret is null for a caller who may not read access keys (`AccessTokenReadAccessKey`).\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "path",
            "description": "The server farm's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeSummary",
            "in": "query",
            "description": "Whether to count the farm's servers and access keys.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The server farm.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerFarmData"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "ServerFarms"
        ],
        "summary": "Delete a server farm",
        "description": "Its access keys are deleted with it and stop working at once. A farm that still has servers can't be deleted:\nmove them to another farm, or delete them, first.\n\n**Access:** the `ServerFarmWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "path",
            "description": "The server farm's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/server-farms/{serverFarmId}/encrypted-token": {
      "get": {
        "tags": [
          "ServerFarms"
        ],
        "summary": "Get the farm's update file",
        "description": "The farm's connection details, encrypted with its secret: the text to put at an update URL the MANAGER doesn't\nupload to (`uploadMethod` `None`), again after every change. It fails with 400 while the farm has\nnever had connection details, as before its first server is installed.\n\n**Access:** the `AccessTokenReadAccessKey` permission, which `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "path",
            "description": "The server farm's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file's text, as a JSON string.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/server-profiles": {
      "post": {
        "tags": [
          "ServerProfiles"
        ],
        "summary": "Create a server profile",
        "description": "Its session limits start empty. Give it to a server farm with the farm's `serverProfileId`. A name another\nprofile of the project has is refused.\n\n**Access:** the `ProjectWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The server profile to create; leave it out for the defaults.",
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ServerProfileCreateParams"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new server profile.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "get": {
        "tags": [
          "ServerProfiles"
        ],
        "summary": "List server profiles",
        "description": "The default profile first, then the others by name.\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Text to look for in a profile's name, or a profile's id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeSummary",
            "in": "query",
            "description": "Whether to count the server farms that use each profile.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "recordIndex",
            "in": "query",
            "description": "The first profile to return, counted from 0.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "recordCount",
            "in": "query",
            "description": "How many profiles to return.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 101
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The server profiles.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ServerProfileData"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/server-profiles/{serverProfileId}": {
      "get": {
        "tags": [
          "ServerProfiles"
        ],
        "summary": "Get a server profile",
        "description": "**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverProfileId",
            "in": "path",
            "description": "The server profile's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeSummary",
            "in": "query",
            "description": "Whether to count the server farms that use it.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The server profile.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerProfileData"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "ServerProfiles"
        ],
        "summary": "Update a server profile",
        "description": "New settings reach the servers of every farm that uses the profile at their next status report, within about a\nminute; new session limits apply to new sessions at once. The default profile can't be renamed.\n\n**Access:** the `ProjectWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverProfileId",
            "in": "path",
            "description": "The server profile's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServerProfileUpdateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The server profile as it is now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "ServerProfiles"
        ],
        "summary": "Delete a server profile",
        "description": "The default profile, and one a server farm uses, can't be deleted.\n\n**Access:** the `ProjectWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverProfileId",
            "in": "path",
            "description": "The server profile's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/servers": {
      "post": {
        "tags": [
          "Servers"
        ],
        "summary": "Add a server",
        "description": "It starts as `NotInstalled`: install VpnHood! SERVER on it next, over SSH or with its install commands. A\nname another server of the project has is refused. The free plan holds up to 5 servers; one more fails with\n`QuotaException`.\n\n**Access:** the `ServerWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The server to add.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServerCreateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The new server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerData"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "get": {
        "tags": [
          "Servers"
        ],
        "summary": "List servers",
        "description": "Servers without the `#premium` tag come first, each part sorted by name.\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Text to look for in a server's name, or a server's id, its server farm's id or an IP address of its access\npoints.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverId",
            "in": "query",
            "description": "The id of a server, to list it alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "query",
            "description": "The id of a server farm, to list its servers alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ipAddress",
            "in": "query",
            "description": "An IP address, to list the servers with an access point on it alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recordIndex",
            "in": "query",
            "description": "The first server to return, counted from 0.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "recordCount",
            "in": "query",
            "description": "How many servers to return.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The servers, each with its state and last status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ServerData"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/servers/{serverId}": {
      "patch": {
        "tags": [
          "Servers"
        ],
        "summary": "Update a server",
        "description": "A new farm, access points, automatic configuration or swap size reaches the server at its next status report,\nwithin about a minute; the others, such as `isEnabled` or `power`, apply to new sessions at once. A\nserver with certificates of its own can't move to another farm: delete them first.\n\n**Access:** the `ServerWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverId",
            "in": "path",
            "description": "The server's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServerUpdateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The server as it is now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerData"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "get": {
        "tags": [
          "Servers"
        ],
        "summary": "Get a server",
        "description": "**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverId",
            "in": "path",
            "description": "The server's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The server, with its state and last status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerData"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Servers"
        ],
        "summary": "Delete a server",
        "description": "Its credentials stop working at once, so the MANAGER refuses VpnHood! SERVER on the machine from then on. The\ncertificates it used alone are deleted with it.\n\n**Access:** the `ServerWrite` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverId",
            "in": "path",
            "description": "The server's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/servers/{serverId}/reconfigure": {
      "post": {
        "tags": [
          "Servers"
        ],
        "summary": "Reconfigure a server",
        "description": "The server takes its settings again at its next status report, within about a minute; until then its state is\n`Configuring`.\n\n**Access:** the `ServerInstall` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverId",
            "in": "path",
            "description": "The server's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/servers/{serverId}/install-by-ssh-user-password": {
      "post": {
        "tags": [
          "Servers"
        ],
        "summary": "Install over SSH with a password",
        "description": "The MANAGER signs in to the machine over SSH, on its public addresses only, and runs VpnHood! SERVER's Linux\ninstaller through sudo, with the settings that connect the server to the MANAGER. It answers once the installer\nis done, and fails after 5 minutes; if the installer doesn't finish, the error's `Data` holds what it\nprinted, under `log`.\n\n**Access:** the `ServerInstall` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverId",
            "in": "path",
            "description": "The server's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The machine, and the account and password to sign in with.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServerInstallBySshUserPasswordParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/servers/{serverId}/install-by-ssh-user-key": {
      "post": {
        "tags": [
          "Servers"
        ],
        "summary": "Install over SSH with a key",
        "description": "The MANAGER signs in to the machine over SSH with the key, on its public addresses only, and runs VpnHood!\nSERVER's Linux installer through sudo, with the settings that connect the server to the MANAGER. It answers once\nthe installer is done, and fails after 5 minutes; if the installer doesn't finish, the error's `Data` holds\nwhat it printed, under `log`.\n\n**Access:** the `ServerInstall` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverId",
            "in": "path",
            "description": "The server's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The machine, and the account and SSH key to sign in with.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServerInstallBySshUserKeyParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/servers/{serverId}/install/manual": {
      "get": {
        "tags": [
          "Servers"
        ],
        "summary": "Get a server's install commands",
        "description": "The settings that connect VpnHood! SERVER to the MANAGER, and one command each for Linux and Windows that\ninstalls it with them. Keep them private: they hold the server's credentials, which work until the server is\ndeleted.\n\n**Access:** the `ServerInstall` permission, which `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverId",
            "in": "path",
            "description": "The server's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The install commands and settings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerInstallManual"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/projects/{projectId}/servers/status-summary": {
      "get": {
        "tags": [
          "Servers"
        ],
        "summary": "Count servers by state",
        "description": "Counts all the project's servers, or one farm's, or one server. Sessions and tunnel speeds are the active\nservers'.\n\n**Access:** the `ProjectRead` permission, which `ProjectReader`, `AccessTokenWriter`, `ProjectWriter`, `ProjectAdmin` and `ProjectOwner` have.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "The project's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverFarmId",
            "in": "query",
            "description": "The id of a server farm, to count its servers alone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serverId",
            "in": "query",
            "description": "The id of a server, to count it alone.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The counts, and the active servers' sessions and speeds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServersStatusSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/system": {
      "post": {
        "tags": [
          "System"
        ],
        "summary": "Archive the ended sessions now",
        "description": "Moves the sessions that ended over 20 minutes ago to the report's archive, as the service also does every few\nminutes by itself.\n\n**Access:** the `Sync` permission, which only the service's administrator has.",
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/team/users/current/projects": {
      "get": {
        "tags": [
          "Team"
        ],
        "summary": "List your projects",
        "description": "The projects whose team has the caller, whatever the role, without their secrets.\n\n**Access:** any signed-in user or bot.",
        "responses": {
          "200": {
            "description": "The caller's projects.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserProject"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/team/users/current/resources": {
      "get": {
        "tags": [
          "Team"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/team/users/current/resources/{resourceId}/permissions": {
      "get": {
        "tags": [
          "Team"
        ],
        "parameters": [
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/team/users/{userId}/bot/reset-api-key": {
      "post": {
        "tags": [
          "Team"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/team/users/{userId}/bot": {
      "patch": {
        "tags": [
          "Team"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamUpdateBotParam"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/team/resources/{resourceId}/roles": {
      "get": {
        "tags": [
          "Team"
        ],
        "parameters": [
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Role"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/team/resources/{resourceId}/user-roles": {
      "get": {
        "tags": [
          "Team"
        ],
        "parameters": [
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roleId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "isBot",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "recordIndex",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "recordCount",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResultOfTeamUserRole"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/team/resources/{resourceId}/users/{userId}": {
      "get": {
        "tags": [
          "Team"
        ],
        "parameters": [
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamUserOfUserAndRole"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/team/resources/{resourceId}/users/email:{email}": {
      "get": {
        "tags": [
          "Team"
        ],
        "parameters": [
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamUserOfUserAndRole"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/team/resources/{resourceId}/roles/{roleId}/bots": {
      "post": {
        "tags": [
          "Team"
        ],
        "parameters": [
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamAddBotParam"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/team/resources/{resourceId}/roles/{roleId}/users/email:{email}": {
      "post": {
        "tags": [
          "Team"
        ],
        "parameters": [
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/TeamAddEmailParam"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamUserRole"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/team/resources/{resourceId}/roles/{roleId}/users/{userId}": {
      "post": {
        "tags": [
          "Team"
        ],
        "parameters": [
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamUserRole"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Team"
        ],
        "parameters": [
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/team/system/api-key": {
      "post": {
        "tags": [
          "Team"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "secret": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/authentication/current": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/authentication/current/signout-all": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/authentication/current/reset-api-key": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    },
    "/api/authentication/signin": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignInRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/authentication/signup": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignUpRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/authentication/refresh-token": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshTokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/authentication/external/google/signin-handler": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": []
      }
    },
    "/api/authentication/external/google/signin-url": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "parameters": [
          {
            "name": "csrfToken",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "nonce",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": []
      }
    }
  },
  "components": {
    "schemas": {
      "AccessData": {
        "required": [
          "access",
          "accessToken",
          "device"
        ],
        "type": "object",
        "properties": {
          "access": {
            "description": "The VPN user.",
            "$ref": "#/components/schemas/AccessTokenUsage"
          },
          "accessToken": {
            "description": "Its access key; the premium and management codes are null unless the caller may read access keys\n(`AccessTokenReadAccessKey`).",
            "$ref": "#/components/schemas/AccessToken"
          },
          "device": {
            "description": "Its device; null for a private key's VPN user, which all the key's devices share.",
            "$ref": "#/components/schemas/Device"
          }
        },
        "description": "A VPN user, with its access key and its device."
      },
      "AccessPoint": {
        "required": [
          "ipAddress",
          "accessPointVisibility",
          "isListen",
          "tcpPort",
          "udpPort",
          "quicPort"
        ],
        "type": "object",
        "properties": {
          "ipAddress": {
            "description": "The IPv4 or IPv6 address. `0.0.0.0` and `::` stand for all the machine's addresses, which only a\n`Private` access point may use.",
            "$ref": "#/components/schemas/IPAddress"
          },
          "accessPointVisibility": {
            "description": "Who gets the address: the panel's Mode.",
            "$ref": "#/components/schemas/AccessPointVisibility"
          },
          "isListen": {
            "type": "boolean",
            "description": "Whether the server listens on the address: only for one your provider routes to the machine, not for a public\none that a router or a cloud's NAT forwards. On Linux, the server adds such an address to its network if the\nmachine lacks it."
          },
          "tcpPort": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The TCP port, not 0: the one the server listens on, and the one apps connect to.",
            "format": "int32"
          },
          "udpPort": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The UDP port for apps whose tunnel protocol is UDP; -1 turns UDP off, and 0 is refused.",
            "format": "int32"
          },
          "quicPort": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The UDP port for apps whose tunnel protocol is QUIC; -1 turns QUIC off.",
            "format": "int32"
          },
          "tcpError": {
            "type": [
              "null",
              "string"
            ],
            "description": "Why the server could not listen on this address's TCP port, as it reported after its last configuration:\n`NotListening` when it reported nothing for the address; null when it listens there, or does not listen on\nthe address. Ignored in a request."
          },
          "udpError": {
            "type": [
              "null",
              "string"
            ],
            "description": "Why the server could not listen on this address's UDP port, as `tcpError` says for TCP. Ignored in a\nrequest."
          },
          "quicError": {
            "type": [
              "null",
              "string"
            ],
            "description": "Why the server could not listen on this address's QUIC port, as `tcpError` says for TCP. Ignored in a\nrequest."
          }
        },
        "description": "An address of a server, with its ports: one the server listens on, one that goes to apps, or both."
      },
      "AccessPointVisibility": {
        "enum": [
          "Private",
          "Public",
          "PublicInToken"
        ],
        "description": "Who gets an access point's address: the panel's Mode.\n\n- `Private`: Never given to apps; the server can still listen on it.\n- `Public`: Kept out of the access keys: the MANAGER gives it to an app only when it sends that app to this server.\n- `PublicInToken`: In every access key of the server farm: the panel's Public in keys."
      },
      "AccessToken": {
        "required": [
          "accessTokenId",
          "accessTokenName",
          "accessTokenProfileId",
          "accessTokenProfileName",
          "accessTokenGroupId",
          "accessTokenGroupName",
          "supportCode",
          "serverFarmId",
          "serverFarmName",
          "firstUsedTime",
          "lastUsedTime",
          "accessCode",
          "managementCode",
          "expirationTime",
          "createdTime",
          "modifiedTime",
          "description",
          "isEnabled",
          "tags",
          "accessKey",
          "customerId",
          "orderId",
          "shopId"
        ],
        "type": "object",
        "properties": {
          "accessTokenId": {
            "type": "string",
            "description": "The access key's id."
          },
          "accessTokenName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The key's name, which goes in the key for the app to show; null when it has none."
          },
          "accessTokenProfileId": {
            "type": "string",
            "description": "The id of the key's access key profile, which sets its limits."
          },
          "accessTokenProfileName": {
            "type": "string",
            "description": "The name of the key's access key profile."
          },
          "accessTokenGroupId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The id of the key's access key group; null when it is in none."
          },
          "accessTokenGroupName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The name of the key's access key group; null when it is in none."
          },
          "supportCode": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The number users quote to support, unique in the project; the app shows it.",
            "format": "int32"
          },
          "serverFarmId": {
            "type": "string",
            "description": "The id of the server farm whose servers the key reaches."
          },
          "serverFarmName": {
            "type": "string",
            "description": "The name of that server farm."
          },
          "firstUsedTime": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the key first connected; null until then.",
            "format": "date-time"
          },
          "lastUsedTime": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the key last connected; null until it first does.",
            "format": "date-time"
          },
          "accessCode": {
            "type": [
              "null",
              "string"
            ],
            "description": "The premium code: 20 digits a user types into the app to connect with this key in place of another key of its\nserver farm. Null where the farm doesn't allow premium codes, or for a caller who may not read access keys\n(`AccessTokenReadAccessKey`)."
          },
          "managementCode": {
            "type": [
              "null",
              "string"
            ],
            "description": "A 20-digit code that lets whoever holds it, with no API key, see the key's use and limits, and disable it until\n3 days after its first connect (`GET .../access-tokens/managementCode:{managementCode}`). Null where the\nserver farm doesn't allow premium codes, or for a caller who may not read access keys\n(`AccessTokenReadAccessKey`)."
          },
          "expirationTime": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the key expires; null for never. A profile with a lifetime sets it at the key's first connect, if it is not\nset by then.",
            "format": "date-time"
          },
          "createdTime": {
            "type": "string",
            "description": "When the key was created.",
            "format": "date-time"
          },
          "modifiedTime": {
            "type": "string",
            "description": "When the key was last changed.",
            "format": "date-time"
          },
          "description": {
            "type": [
              "null",
              "string"
            ],
            "description": "A note on the key; null when it has none. With `#message` in it, the rest of it is what a user sees when\nthe key is disabled."
          },
          "isEnabled": {
            "type": "boolean",
            "description": "Whether the key may connect; a disabled key's users are refused."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The key's tags, such as `#vip`, which go in the key; a server with a client filter takes only keys whose\ntags pass it."
          },
          "accessKey": {
            "type": [
              "null",
              "string"
            ],
            "description": "The key itself, the text a user pastes into the app; null unless asked for with `includeAccessKey`."
          },
          "customerId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Your own id of the customer the key is for, to find it by; null when none was given."
          },
          "orderId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Your own id of the order the key came from, to find it by; null when none was given."
          },
          "shopId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Your own id of the shop that sold the key, to find it by; null when none was given."
          }
        },
        "description": "An access key: the server farm it reaches, the profile that sets its limits, and its state."
      },
      "AccessTokenBrief": {
        "required": [
          "accessTokenName",
          "supportCode",
          "firstUsedTime",
          "lastUsedTime",
          "expirationTime",
          "cycleTraffic",
          "totalTraffic",
          "isEnabled",
          "maxCycleTrafficMb",
          "maxTotalTrafficMb",
          "lifetime",
          "maxDevice",
          "canDisable"
        ],
        "type": "object",
        "properties": {
          "accessTokenName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The key's name; null when it has none."
          },
          "supportCode": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The number users quote to support.",
            "format": "int32"
          },
          "firstUsedTime": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the key first connected; null until then.",
            "format": "date-time"
          },
          "lastUsedTime": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the key last connected; null until it first does.",
            "format": "date-time"
          },
          "expirationTime": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the key expires; null for never, or until its profile's lifetime sets it at the first connect.",
            "format": "date-time"
          },
          "cycleTraffic": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The bytes a private key has sent and received this month (UTC); 0 for a public key.",
            "format": "int64"
          },
          "totalTraffic": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The bytes a private key has sent and received in all; 0 for a public key.",
            "format": "int64"
          },
          "isEnabled": {
            "type": "boolean",
            "description": "Whether the key may connect: both it and its profile are enabled."
          },
          "maxCycleTrafficMb": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The key's monthly traffic limit in megabytes, its own or its profile's; null for no limit.",
            "format": "int32"
          },
          "maxTotalTrafficMb": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The key's total traffic limit in megabytes, its own or its profile's; null for no limit.",
            "format": "int32"
          },
          "lifetime": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "How many days the key lasts from its first connect, by its profile; 0 for no limit.",
            "format": "int32"
          },
          "maxDevice": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "How many devices may be connected with the key at once, by its profile, if the key is private; 0 for no limit.",
            "format": "int32"
          },
          "canDisable": {
            "type": "boolean",
            "description": "Whether the management code may still disable the key: until 3 days after its first connect."
          }
        },
        "description": "What an access key's management code shows of the key: its use, its limits and its state."
      },
      "AccessTokenCreateParams": {
        "required": [
          "serverFarmId",
          "accessTokenProfileId"
        ],
        "type": "object",
        "properties": {
          "serverFarmId": {
            "type": "string",
            "description": "The id of the server farm whose servers the keys reach."
          },
          "accessTokenProfileId": {
            "type": "string",
            "description": "The id of the access key profile that sets the keys' limits."
          },
          "accessTokenName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The keys' name, up to 50 characters, which goes in the key for the app to show; leave it out for none."
          },
          "accessTokenGroupId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The id of an access key group to put the keys in; leave it out for none."
          },
          "expirationTime": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the keys expire, in UTC; leave it out for never, or for the profile's lifetime to set it at each key's\nfirst connect.",
            "format": "date-time"
          },
          "isEnabled": {
            "type": [
              "null",
              "boolean"
            ],
            "description": "Whether the keys may connect; leave it out for yes."
          },
          "description": {
            "type": [
              "null",
              "string"
            ],
            "description": "A note on the keys, up to 200 characters; with `#message` in it, the rest of it is what a user sees when\nthe key is disabled. Leave it out for none."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags for the keys, such as `#vip`: letters, digits, `_` and `:`, up to 40 characters together. A\nmissing `#` is added. Leave it out for none."
          },
          "count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "How many keys to create; leave it out for one.",
            "format": "int32"
          },
          "customerId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Your own id of the customer, up to 40 characters, to find the keys by; leave it out for none."
          },
          "orderId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Your own id of the order, up to 40 characters, to find the keys by; leave it out for none."
          },
          "shopId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Your own id of the shop, up to 10 characters, to find the keys by; leave it out for none."
          }
        },
        "description": "The access keys to create: one, or `count` alike."
      },
      "AccessTokenData": {
        "required": [
          "accessToken"
        ],
        "type": "object",
        "properties": {
          "accessToken": {
            "description": "The access key.",
            "$ref": "#/components/schemas/AccessToken"
          },
          "accessTokenProfile": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AccessTokenProfile"
              }
            ],
            "description": "The key's access key profile; null unless asked for."
          },
          "usage": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Usage"
              }
            ],
            "description": "The key's traffic and devices in the period asked for; null without `usageBeginTime`, when the key has no\nusage in the period, or while usage can't be read."
          },
          "access": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AccessTokenUsage"
              }
            ],
            "description": "The VPN user that all the devices of a private key share, with its traffic and own limits; null for a public\nkey, whose devices are each a VPN user of their own, or before a private key's first connect."
          },
          "isPublic": {
            "type": "boolean",
            "description": "Whether the key's profile is public."
          }
        },
        "description": "An access key, with its profile and its usage where asked for, and its shared VPN user."
      },
      "AccessTokenGroup": {
        "required": [
          "accessTokenGroupId",
          "accessTokenGroupName",
          "description",
          "createdTime",
          "accessTokenSummary"
        ],
        "type": "object",
        "properties": {
          "accessTokenGroupId": {
            "type": "string",
            "description": "The group's id."
          },
          "accessTokenGroupName": {
            "type": "string",
            "description": "The group's name, unique in the project."
          },
          "description": {
            "type": [
              "null",
              "string"
            ],
            "description": "A note on the group; null when it has none."
          },
          "createdTime": {
            "type": "string",
            "description": "When the group was created.",
            "format": "date-time"
          },
          "accessTokenSummary": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AccessTokenSummary"
              }
            ],
            "description": "How many of its keys are active, inactive and unused; null unless asked for."
          }
        },
        "description": "An access key group: a named set of access keys."
      },
      "AccessTokenGroupCreateParams": {
        "required": [
          "accessTokenGroupName"
        ],
        "type": "object",
        "properties": {
          "accessTokenGroupName": {
            "type": "string",
            "description": "The group's name, up to 50 characters, unique in the project."
          },
          "description": {
            "type": [
              "null",
              "string"
            ],
            "description": "A note on the group; leave it out for none."
          }
        },
        "description": "The access key group to create."
      },
      "AccessTokenGroupUpdateParams": {
        "type": "object",
        "properties": {
          "accessTokenGroupName": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The group's new name, up to 50 characters, unique in the project."
          },
          "description": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The group's new note."
          }
        },
        "description": "The fields of an access key group to change; one left out keeps its value."
      },
      "AccessTokenProfile": {
        "required": [
          "accessTokenProfileId",
          "accessTokenProfileName",
          "description",
          "createdTime",
          "isEnabled",
          "isPublic",
          "maxCycleTrafficMb",
          "maxTotalTrafficMb",
          "maxDownloadSpeedMbps",
          "maxUploadSpeedMbps",
          "lifetime",
          "maxDevice",
          "clientPolicies",
          "adRequirement",
          "accessTokenSummary"
        ],
        "type": "object",
        "properties": {
          "accessTokenProfileId": {
            "type": "string",
            "description": "The profile's id."
          },
          "accessTokenProfileName": {
            "type": "string",
            "description": "The profile's name, unique in the project."
          },
          "description": {
            "type": [
              "null",
              "string"
            ],
            "description": "A note on the profile; null when it has none."
          },
          "createdTime": {
            "type": "string",
            "description": "When the profile was created.",
            "format": "date-time"
          },
          "isEnabled": {
            "type": "boolean",
            "description": "Whether its keys may connect; a disabled profile's keys are all refused."
          },
          "isPublic": {
            "type": "boolean",
            "description": "Whether its keys are public: free, with each device that uses one a VPN user of its own, with its own quota. A\nprivate key is premium, and all its devices share one VPN user and its quota."
          },
          "maxCycleTrafficMb": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The most traffic each VPN user of its keys may move in a month (UTC), sent and received together, in megabytes\nof 1,000,000 bytes; null for no limit.",
            "format": "int32"
          },
          "maxTotalTrafficMb": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The most traffic each VPN user of its keys may move in all, sent and received together, in megabytes; null for\nno limit.",
            "format": "int32"
          },
          "maxDownloadSpeedMbps": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The fastest each session of its keys may download, in megabits a second; null for no limit.",
            "format": "int32"
          },
          "maxUploadSpeedMbps": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The fastest each session of its keys may upload, in megabits a second; null for no limit.",
            "format": "int32"
          },
          "lifetime": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "How many days a key lasts from its first connect, which sets its expiration if it has none; 0 for no limit.",
            "format": "int32"
          },
          "maxDevice": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "How many devices may be connected with one of its private keys at once, a new one ending the oldest one's\nsession; 0 for no limit.",
            "format": "int32"
          },
          "clientPolicies": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ClientPolicy"
            },
            "description": "What the app offers by the device's country: plans, their time limits and the locations to pick. Null for none,\nwhich allows ordinary connections without a time limit."
          },
          "adRequirement": {
            "description": "The ad an ordinary connection needs before it carries traffic: `None`, `Flexible` (one if the app can\nshow it) or `Rewarded` (a rewarded ad, watched to the end). Ads need an app of your own that shows them.",
            "$ref": "#/components/schemas/AdRequirement"
          },
          "accessTokenSummary": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AccessTokenSummary"
              }
            ],
            "description": "How many of its keys are active, inactive and unused; null unless asked for."
          }
        },
        "description": "An access key profile: the limits and plans of the access keys made from it."
      },
      "AccessTokenProfileCreateParams": {
        "required": [
          "accessTokenProfileName"
        ],
        "type": "object",
        "properties": {
          "accessTokenProfileName": {
            "type": "string",
            "description": "The profile's name, up to 50 characters, unique in the project."
          },
          "adRequirement": {
            "description": "The ad an ordinary connection needs before it carries traffic: `None`, `Flexible` or `Rewarded`;\nleave it out for `None`.",
            "$ref": "#/components/schemas/AdRequirement"
          },
          "isPublic": {
            "type": "boolean",
            "description": "Whether its keys are public: free, with each device that uses one a VPN user of its own, with its own quota.\nLeave it out for private keys, which are premium and whose devices share one VPN user."
          },
          "description": {
            "type": [
              "null",
              "string"
            ],
            "description": "A note on the profile; leave it out for none."
          },
          "clientPolicies": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ClientPolicy"
            },
            "description": "What the app offers by the device's country; a country may be in one policy only. Leave it out for none, which\nallows ordinary connections without a time limit."
          },
          "lifetime": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "How many days a key lasts from its first connect; leave it out for no limit.",
            "format": "int32"
          },
          "maxDevice": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "How many devices may be connected with one of its private keys at once; leave it out for no limit.",
            "format": "int32"
          },
          "maxCycleTrafficMb": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The most traffic each VPN user of its keys may move in a month (UTC), in megabytes; leave it out for no limit.",
            "format": "int32"
          },
          "maxTotalTrafficMb": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The most traffic each VPN user of its keys may move in all, in megabytes; leave it out for no limit.",
            "format": "int32"
          },
          "maxDownloadSpeedMbps": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The fastest each session of its keys may download, in megabits a second; leave it out for no limit.",
            "format": "int32"
          },
          "maxUploadSpeedMbps": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The fastest each session of its keys may upload, in megabits a second; leave it out for no limit.",
            "format": "int32"
          }
        },
        "description": "The access key profile to create."
      },
      "AccessTokenProfileUpdateParams": {
        "type": "object",
        "properties": {
          "accessTokenProfileName": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The profile's new name, up to 50 characters, unique in the project."
          },
          "clientPolicies": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfClientPolicy[]"
              }
            ],
            "description": "The profile's new client policies, which replace all of them; null for none."
          },
          "isEnabled": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfboolean"
              }
            ],
            "description": "Whether its keys may connect; disabling it refuses them all, and ends their open sessions at their server's next\nusage report."
          },
          "lifetime": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfint"
              }
            ],
            "description": "The new number of days a key lasts from its first connect; 0 for no limit. A key that has an expiration keeps\nit; one that has none gets one at its next connect, counted from then."
          },
          "maxDevice": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfint"
              }
            ],
            "description": "The new number of devices that may be connected with a private key at once; 0 for no limit."
          },
          "maxCycleTrafficMb": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfint"
              }
            ],
            "description": "The new monthly traffic limit of each VPN user, in megabytes; null for no limit."
          },
          "maxTotalTrafficMb": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfint"
              }
            ],
            "description": "The new total traffic limit of each VPN user, in megabytes; null for no limit."
          },
          "maxDownloadSpeedMbps": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfint"
              }
            ],
            "description": "The new download speed limit of each new session, in megabits a second; null for no limit."
          },
          "maxUploadSpeedMbps": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfint"
              }
            ],
            "description": "The new upload speed limit of each new session, in megabits a second; null for no limit."
          },
          "description": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The profile's new note."
          },
          "adRequirement": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfAdRequirement"
              }
            ],
            "description": "The ad an ordinary connection now needs: `None`, `Flexible` or `Rewarded`."
          }
        },
        "description": "The fields of an access key profile to change; one left out keeps its value."
      },
      "AccessTokenSummary": {
        "required": [
          "totalTokenCount",
          "activeTokenCount",
          "inactiveTokenCount",
          "unusedTokenCount"
        ],
        "type": "object",
        "properties": {
          "totalTokenCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "All the keys.",
            "format": "int32"
          },
          "activeTokenCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The keys that connected in the last 7 days.",
            "format": "int32"
          },
          "inactiveTokenCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The keys last connected more than 7 days ago.",
            "format": "int32"
          },
          "unusedTokenCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The keys that never connected.",
            "format": "int32"
          }
        },
        "description": "How many access keys there are, by their use."
      },
      "AccessTokenUpdateParams": {
        "type": "object",
        "properties": {
          "accessTokenName": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The key's new name, up to 50 characters; null for none."
          },
          "accessTokenProfileId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The id of the key's new access key profile."
          },
          "accessTokenGroupId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The id of the key's new access key group; null for none."
          },
          "serverFarmId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The id of the key's new server farm. An app holding the key gets the new key at its next connect if that farm's\n`pushTokenToClient` is on; otherwise it needs the new key given to it."
          },
          "expirationTime": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfDateTime"
              }
            ],
            "description": "When the key now expires, in UTC; null for never, unless its profile's lifetime sets it again at the next\nconnect."
          },
          "isEnabled": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfboolean"
              }
            ],
            "description": "Whether the key may connect; disabling it ends its open sessions at their server's next usage report."
          },
          "description": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The key's new note, up to 200 characters; null for none."
          },
          "tags": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfString[]"
              }
            ],
            "description": "The key's new tags, which replace all of them."
          },
          "customerId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The key's new customer id, up to 40 characters; null for none."
          },
          "orderId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The key's new order id, up to 40 characters; null for none."
          },
          "shopId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The key's new shop id, up to 10 characters; null for none."
          },
          "maxCycleTrafficMb": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfint"
              }
            ],
            "description": "The key's own monthly traffic limit in megabytes, in place of its profile's; null to follow the profile. For a\nprivate key only; a new month clears it, unless the key moved no traffic in the month before."
          },
          "maxTotalTrafficMb": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfint"
              }
            ],
            "description": "The key's own total traffic limit in megabytes, in place of its profile's; null to follow the profile. For a\nprivate key only."
          }
        },
        "description": "The fields of an access key to change; one left out keeps its value."
      },
      "AccessTokenUsage": {
        "required": [
          "accessId",
          "accessTokenId",
          "createdTime",
          "lastUsedTime",
          "rewardedAdExpirationTime",
          "rewardedAdMinutes",
          "description",
          "premiumByTrialDailyLimit",
          "premiumByTrialDailyUsed",
          "premiumByTrialDailyUsedTime",
          "cycleTraffic",
          "totalTraffic",
          "maxCycleTrafficMb",
          "maxTotalTrafficMb"
        ],
        "type": "object",
        "properties": {
          "accessId": {
            "type": "string",
            "description": "The VPN user's id."
          },
          "accessTokenId": {
            "type": "string",
            "description": "The id of its access key."
          },
          "createdTime": {
            "type": "string",
            "description": "When it first connected.",
            "format": "date-time"
          },
          "lastUsedTime": {
            "type": "string",
            "description": "When it was last used.",
            "format": "date-time"
          },
          "rewardedAdExpirationTime": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the premium time its last rewarded ad gave ends; null when it has watched none.",
            "format": "date-time"
          },
          "rewardedAdMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The minutes of premium a rewarded ad gives it, by its last connect's client policy; null where none is offered.",
            "format": "int32"
          },
          "description": {
            "type": [
              "null",
              "string"
            ],
            "description": "A note on the VPN user; nothing in the API sets it, so it is null."
          },
          "premiumByTrialDailyLimit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The seconds of premium trial it may use a day (UTC), by its last connect; null when that was no trial, or the\ntrial has no daily limit.",
            "format": "int32"
          },
          "premiumByTrialDailyUsed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The seconds of premium trial it has used on the day of `premiumByTrialDailyUsedTime`.",
            "format": "int32"
          },
          "premiumByTrialDailyUsedTime": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the count of its trial seconds for the day began; null before its first trial.",
            "format": "date-time"
          },
          "cycleTraffic": {
            "description": "The bytes it has moved this month (UTC): `sent` by its devices and `received` by them.",
            "$ref": "#/components/schemas/Traffic"
          },
          "totalTraffic": {
            "description": "The bytes it has moved in all: `sent` by its devices and `received` by them.",
            "$ref": "#/components/schemas/Traffic"
          },
          "maxCycleTrafficMb": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "Its own monthly traffic limit in megabytes, in place of its profile's; null to follow the profile.",
            "format": "int32"
          },
          "maxTotalTrafficMb": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "Its own total traffic limit in megabytes, in place of its profile's; null to follow the profile.",
            "format": "int32"
          }
        },
        "description": "A VPN user: the use of an access key by one device, for a public key, or by all its devices together, for a private\nkey."
      },
      "AdRequirement": {
        "description": "Specifies the ad a session requires before it carries traffic.\n\n- `None`: No ad.\n- `Flexible`: An ad if the app can show one; a failure to show it does not end the session.\n- `Rewarded`: A rewarded ad, which the user must watch to the end."
      },
      "ApiKey": {
        "required": [
          "accessToken",
          "refreshToken",
          "userId"
        ],
        "type": "object",
        "properties": {
          "accessToken": {
            "$ref": "#/components/schemas/Token"
          },
          "refreshToken": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Token"
              }
            ]
          },
          "userId": {
            "type": "string"
          }
        }
      },
      "Certificate": {
        "required": [
          "certificateId",
          "serverFarmId",
          "serverFarmName",
          "signingType",
          "domainVisibility",
          "serverId",
          "serverName",
          "commonName",
          "issueTime",
          "expirationTime",
          "createdTime",
          "thumbprint",
          "isValidated",
          "validateCount",
          "validateInprogress",
          "validateErrorCount",
          "validateError",
          "validateErrorTime",
          "priority",
          "description"
        ],
        "type": "object",
        "properties": {
          "certificateId": {
            "type": "string",
            "description": "The certificate's id."
          },
          "serverFarmId": {
            "type": "string",
            "description": "The id of the server farm it belongs to."
          },
          "serverFarmName": {
            "type": "string",
            "description": "The name of that server farm."
          },
          "signingType": {
            "description": "How it gets signed.",
            "$ref": "#/components/schemas/SigningType"
          },
          "domainVisibility": {
            "description": "Who gets its domain.",
            "$ref": "#/components/schemas/DomainVisibility"
          },
          "serverId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The id of the one server that uses it alone; null when every server of the farm uses it."
          },
          "serverName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The name of that server; null when every server of the farm uses it."
          },
          "commonName": {
            "type": "string",
            "description": "The domain it is for: the panel's Domain Name."
          },
          "issueTime": {
            "type": "string",
            "description": "When it starts to be valid.",
            "format": "date-time"
          },
          "expirationTime": {
            "type": "string",
            "description": "When it expires.",
            "format": "date-time"
          },
          "createdTime": {
            "type": "string",
            "description": "When it was added to the farm.",
            "format": "date-time"
          },
          "thumbprint": {
            "type": "string",
            "description": "Its SHA-1 thumbprint, in hexadecimal."
          },
          "isValidated": {
            "type": "boolean",
            "description": "Whether a certificate authority signed it and it has not expired: the panel's CA Signed. Apps check such a\ncertificate by its signer and its name, so keys keep working when it is renewed; a self-signed one they accept\nonly by the fingerprint in their key."
          },
          "validateCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "How many times AutoSign has had it signed.",
            "format": "int32"
          },
          "validateInprogress": {
            "type": "boolean",
            "description": "Whether AutoSign is having it signed right now: the panel's Validating."
          },
          "validateErrorCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "How many AutoSign attempts in a row have failed; after 6, its signing goes back to `Manual`.",
            "format": "int32"
          },
          "validateError": {
            "type": [
              "null",
              "string"
            ],
            "description": "Why the last AutoSign attempt failed, in plain words; null when it did not fail."
          },
          "validateErrorTime": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the last AutoSign attempt failed; null when it did not fail.",
            "format": "date-time"
          },
          "priority": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The order of its domain among those of `Public` certificates when the MANAGER gives apps several, lowest\nfirst: the panel's Normal is 0, Low 5 and Lowest 10. It does not change which certificate a server presents.",
            "format": "int32"
          },
          "description": {
            "type": [
              "null",
              "string"
            ],
            "description": "A note about the certificate, which the MANAGER does not use; null when it has none."
          }
        },
        "description": "An SSL/TLS certificate of a server farm; its file and private key are never given out."
      },
      "CertificateCreateParams": {
        "type": "object",
        "properties": {
          "certificateSigningRequest": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CertificateSigningRequest"
              }
            ],
            "description": "The certificate's domain and the rest of its subject; leave it out for a made-up domain."
          },
          "domainVisibility": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DomainVisibility"
              }
            ],
            "description": "Who gets its domain; leave it out for `Public`."
          },
          "signingType": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SigningType"
              }
            ],
            "description": "How it gets signed; leave it out for `Manual`."
          },
          "serverId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The id of the one server of the farm that is to use it alone; leave it out for every server of the farm."
          },
          "expirationTime": {
            "type": [
              "null",
              "string"
            ],
            "description": "When it expires, in UTC; leave it out for 8 to 11 years from now, at random.",
            "format": "date-time"
          },
          "priority": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The order of its domain among those of `Public` certificates, lowest first; leave it out for 0.",
            "format": "int32"
          },
          "description": {
            "type": [
              "null",
              "string"
            ],
            "description": "A note about it, which the MANAGER does not use."
          }
        },
        "description": "A self-signed certificate to create for a server farm."
      },
      "CertificateSigningRequest": {
        "type": "object",
        "properties": {
          "commonName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The domain the certificate is for, such as `server1.example.com`, and not a wildcard; leave it out for a\nmade-up name."
          },
          "organization": {
            "type": [
              "null",
              "string"
            ],
            "description": "The organization (O) in the subject."
          },
          "organizationUnit": {
            "type": [
              "null",
              "string"
            ],
            "description": "The organizational unit (OU) in the subject."
          },
          "locationCountry": {
            "type": [
              "null",
              "string"
            ],
            "description": "The country (C) in the subject."
          },
          "locationState": {
            "type": [
              "null",
              "string"
            ],
            "description": "The state or province (ST) in the subject."
          },
          "locationCity": {
            "type": [
              "null",
              "string"
            ],
            "description": "The city (L) in the subject."
          }
        },
        "description": "The subject of a new self-signed certificate: its domain, and the details beside it."
      },
      "CertificateUpdateParams": {
        "type": "object",
        "properties": {
          "serverId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The id of the one server of the farm that is to use it alone, or null for every server of the farm."
          },
          "signingType": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfSigningType"
              }
            ],
            "description": "How it is to be signed; a change to `AutoSign` asks Let's Encrypt at once."
          },
          "domainVisibility": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfDomainVisibility"
              }
            ],
            "description": "Who is to get its domain."
          },
          "priority": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfint"
              }
            ],
            "description": "The new order of its domain among those of `Public` certificates, lowest first."
          },
          "description": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The new note."
          }
        },
        "description": "The fields of a certificate to change; one left out keeps its value."
      },
      "CertificateUploadParams": {
        "required": [
          "rawData"
        ],
        "type": "object",
        "properties": {
          "serverId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The id of the one server of the farm that is to use it alone; leave it out for every server of the farm."
          },
          "domainVisibility": {
            "description": "Who gets its domain; leave it out for `Public`.",
            "$ref": "#/components/schemas/DomainVisibility"
          },
          "signingType": {
            "description": "How it gets signed; leave it out for `Manual`.",
            "$ref": "#/components/schemas/SigningType"
          },
          "priority": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The order of its domain among those of `Public` certificates, lowest first; leave it out for 0.",
            "format": "int32"
          },
          "description": {
            "type": [
              "null",
              "string"
            ],
            "description": "A note about it, which the MANAGER does not use."
          },
          "rawData": {
            "type": "string",
            "description": "The certificate as a PFX (PKCS #12) file with its private key, in Base64.",
            "format": "byte"
          },
          "password": {
            "type": [
              "null",
              "string"
            ],
            "description": "The PFX file's password; leave it out for none."
          }
        },
        "description": "A certificate file to upload for a server farm, and its settings."
      },
      "ClientFilter": {
        "required": [
          "clientFilterId",
          "clientFilterName",
          "filter",
          "description"
        ],
        "type": "object",
        "properties": {
          "clientFilterId": {
            "type": "string",
            "description": "The client filter's id."
          },
          "clientFilterName": {
            "type": "string",
            "description": "The client filter's name, unique in the project."
          },
          "filter": {
            "type": "string",
            "description": "The rule: tags such as `#vip`, each true when the client has it, joined with `&&`, `||`,\n`!` and parentheses, as in `#premium || (#loc:US && #vip)`. A client's tags are its access\nkey's tags and `#loc:` with the code of the country it connects from."
          },
          "description": {
            "type": [
              "null",
              "string"
            ],
            "description": "A note about the client filter; null when it has none."
          }
        },
        "description": "A client filter: a rule over a client's tags that decides which clients a server serves."
      },
      "ClientFilterCreateParams": {
        "required": [
          "clientFilterName",
          "filter",
          "description"
        ],
        "type": "object",
        "properties": {
          "clientFilterName": {
            "type": "string",
            "description": "The client filter's name, unique in the project."
          },
          "filter": {
            "type": "string",
            "description": "The rule: tags such as `#vip`, each true when the client has it, joined with `&&`, `||`,\n`!` and parentheses, as in `#premium || (#loc:US && #vip)`. A client's tags are its access\nkey's tags and `#loc:` with the code of the country it connects from."
          },
          "description": {
            "type": [
              "null",
              "string"
            ],
            "description": "A note about the client filter, or null for none."
          }
        },
        "description": "A new client filter."
      },
      "ClientFilterUpdateParams": {
        "type": "object",
        "properties": {
          "clientFilterName": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The new name, unique in the project."
          },
          "filter": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The new rule over the client's tags, written as in `filter` of a new client filter."
          },
          "description": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The new note."
          }
        },
        "description": "The fields of a client filter to change; one left out keeps its value."
      },
      "ClientPolicy": {
        "required": [
          "clientCountries"
        ],
        "type": "object",
        "properties": {
          "clientCountries": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The two-letter codes of the countries the policy is for, by the device's IP, or `*` for every country no\nother policy names."
          },
          "freeLocations": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            },
            "description": "The country codes of the server locations a public key's ordinary connections may use; null for them all."
          },
          "autoLocationOnly": {
            "type": "boolean",
            "description": "Whether the device must let the servers pick its location; a connect to a location it picked is refused."
          },
          "unblockableOnly": {
            "type": "boolean",
            "description": "Whether the app lists only the locations that have servers tagged `#unblockable`."
          },
          "normal": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The minutes an ordinary connection lasts, one that is neither a trial nor a rewarded ad's; 0 for no limit, null\nto refuse ordinary connections.",
            "format": "int32"
          },
          "premiumByTrial": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The minutes a premium trial connection lasts; 0 for no limit, null to offer no trial.",
            "format": "int32"
          },
          "premiumByRewardedAd": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The minutes of premium a rewarded ad gives; 0 for no limit, null to offer no rewarded ads.",
            "format": "int32"
          },
          "premiumByPurchase": {
            "type": "boolean",
            "description": "Whether the app offers premium for sale."
          },
          "premiumByCode": {
            "type": "boolean",
            "description": "Whether the app lets users type a premium code."
          },
          "purchaseUrl": {
            "type": [
              "null",
              "string"
            ],
            "description": "The operator's own shop. Naming one replaces the app's in-app store; a build shipped through a\nstore ignores it.",
            "format": "uri"
          },
          "premiumByTrialDailyLimit": {
            "description": "The most premium trial a VPN user gets a day (UTC), as `hh:mm:ss` or a number of seconds, in whole seconds\nunder 24 hours; null for no daily limit."
          }
        },
        "description": "What the app offers the devices of some countries: the plans to connect with, their time limits, and the locations\nto pick. A device takes the policy that names its country, else the one with `*`; with neither, it connects\nordinarily without a time limit."
      },
      "CountryUsage": {
        "required": [
          "country",
          "deviceCount"
        ],
        "type": "object",
        "properties": {
          "country": {
            "type": [
              "null",
              "string"
            ],
            "description": "The country's two-letter code, as `US`; null for the devices whose country is not known."
          },
          "deviceCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "How many devices used the VPN from that country in the period.",
            "format": "int32"
          }
        },
        "description": "How many devices used the VPN from one country."
      },
      "Device": {
        "required": [
          "deviceId",
          "clientId",
          "clientVersion",
          "ipAddress",
          "location",
          "userAgent",
          "createdTime",
          "modifiedTime",
          "lockedTime"
        ],
        "type": "object",
        "properties": {
          "deviceId": {
            "type": "string",
            "description": "The device's id."
          },
          "clientId": {
            "type": "string",
            "description": "The client id the device's app made for it, unique in the project."
          },
          "clientVersion": {
            "type": [
              "null",
              "string"
            ],
            "description": "The app's version at the device's last connect."
          },
          "ipAddress": {
            "type": [
              "null",
              "string"
            ],
            "description": "Always null: a device's IP address is not kept."
          },
          "location": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Location"
              }
            ],
            "description": "The device's country at its last connect, by its IP; its region and city are always null. Null when the country\nis unknown."
          },
          "userAgent": {
            "type": [
              "null",
              "string"
            ],
            "description": "The app's user agent at the device's last connect."
          },
          "createdTime": {
            "type": "string",
            "description": "When the device first connected.",
            "format": "date-time"
          },
          "modifiedTime": {
            "type": "string",
            "description": "When the device last connected.",
            "format": "date-time"
          },
          "lockedTime": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the device was locked; null when it is not.",
            "format": "date-time"
          },
          "osName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The device's operating system, read from `userAgent`."
          }
        },
        "description": "A device that has connected with one of the project's access keys."
      },
      "DeviceData": {
        "type": "object",
        "properties": {
          "device": {
            "description": "The device.",
            "$ref": "#/components/schemas/Device"
          },
          "usage": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TrafficUsage"
              }
            ],
            "description": "Its traffic in the period asked for; null without `usageBeginTime`, when it has none in the period, or\nwhile usage can't be read."
          }
        },
        "description": "A device with its traffic."
      },
      "DeviceUpdateParams": {
        "type": "object",
        "properties": {
          "isLocked": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfboolean"
              }
            ],
            "description": "Whether the device is locked: a locked device's next connects are refused, with any of the project's keys."
          }
        },
        "description": "The fields of a device to change; one left out keeps its value."
      },
      "DomainVisibility": {
        "enum": [
          "Private",
          "Public",
          "PublicInToken"
        ],
        "description": "Who gets a certificate's domain: the panel's Visibility. Whatever it is, the servers present the certificate to apps\nthat ask for its domain, unless it is `DomainOnly`.\n\n- `Private`: Never given to apps.\n- `Public`: Kept out of the access keys. One that a single server uses alone, if it is CA signed or `DomainOnly`,\nreaches apps when the MANAGER sends them to that server.\n- `PublicInToken`: In every access key of the server farm: the panel's Public in keys. A farm has exactly one such certificate,\nwhich all its servers use; giving it to another makes this one `Public`."
      },
      "EmailVerifyParams": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The code from the verification email's link: its `oobCode` parameter."
          }
        },
        "description": "The code that verifies an email."
      },
      "FarmTokenRepo": {
        "required": [
          "farmTokenRepoId",
          "farmTokenRepoName",
          "publishUrl",
          "repoSettings",
          "isUpToDate",
          "uploadedTime",
          "failedCount",
          "error"
        ],
        "type": "object",
        "properties": {
          "farmTokenRepoId": {
            "type": "string",
            "description": "The update URL's id."
          },
          "farmTokenRepoName": {
            "type": "string",
            "description": "The update URL's name, for you to tell them apart."
          },
          "publishUrl": {
            "type": "string",
            "description": "The address apps read the file from: it must be public, as apps read it without signing in, and give the file\nitself, with no redirect.",
            "format": "uri"
          },
          "repoSettings": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FarmTokenRepoSettings"
              }
            ],
            "description": "How the MANAGER uploads the file there; null when you put it there yourself. A caller who may not change the\nfarm (`ServerFarmWrite`) gets only `fileUrl`, without its query, and `uploadMethod`."
          },
          "isUpToDate": {
            "type": [
              "null",
              "boolean"
            ],
            "description": "Whether the file at `publishUrl` holds the farm's current connection details, as read just now; null unless\n`checkStatus` was asked for."
          },
          "uploadedTime": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the MANAGER last tried to upload the file, whether or not it worked; null until it first tries.",
            "format": "date-time"
          },
          "failedCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "How many uploads in a row have failed. A failed upload is tried again about every hour until 10 have failed; a\nchange of the farm's connection details or a push tries again at once.",
            "format": "int32"
          },
          "error": {
            "type": [
              "null",
              "string"
            ],
            "description": "Why the last upload failed or, with `checkStatus`, why the file is not up to date; null when all is well. A\ncaller who may not change the farm gets only \"The upload failed.\" for an upload's error."
          }
        },
        "description": "An update URL of a server farm: a file on the web where the MANAGER publishes the farm's connection details,\nencrypted, for apps that can't connect to fetch."
      },
      "FarmTokenRepoCreateParams": {
        "required": [
          "repoName",
          "publishUrl",
          "repoSettings"
        ],
        "type": "object",
        "properties": {
          "repoName": {
            "type": "string",
            "description": "The update URL's name, for you to tell them apart."
          },
          "publishUrl": {
            "type": "string",
            "description": "The address apps read the file from, on a site or a CDN your users can reach: public, and giving the file\nitself, with no redirect.",
            "format": "uri"
          },
          "repoSettings": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FarmTokenRepoSettings"
              }
            ],
            "description": "How the MANAGER uploads the file there, or null to put it there yourself: its text comes from\n`GET .../server-farms/{serverFarmId}/encrypted-token`, and changes with every change of the farm."
          }
        },
        "description": "An update URL to add to a server farm."
      },
      "FarmTokenRepoSettings": {
        "required": [
          "fileUrl",
          "uploadMethod"
        ],
        "type": "object",
        "properties": {
          "fileUrl": {
            "type": "string",
            "description": "The address the upload goes to, such as the storage's API address for the file, which may differ from where apps\nread it.",
            "format": "uri"
          },
          "uploadMethod": {
            "description": "How the MANAGER uploads the file; `None` for not at all.",
            "$ref": "#/components/schemas/UploadMethod"
          },
          "accessToken": {
            "type": [
              "null",
              "string"
            ],
            "description": "The storage's token for `{access_token}`, such as a GitHub, GitLab or Bitbucket token; null for none."
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "The request's headers, by name, such as `Authorization` with `token {access_token}`. A body goes as\n`application/json`, and a `Content-Type` header makes the upload fail."
          },
          "formData": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Fields to send as `multipart/form-data`, by name, in place of the body; empty for none."
          },
          "body": {
            "type": [
              "null",
              "string"
            ],
            "description": "The request's body, such as JSON with `{farm_token_base64}` in it; null for none."
          }
        },
        "description": "How the MANAGER uploads a farm's update file to an update URL: one HTTP request, built from these fields. In the\nheaders, the form data and the body, it replaces `{access_token}` with `accessToken`, `{farm_token}`\nwith the file's text, `{farm_token_base64}` with that text in Base64, and `{sha}` with the `sha` a\nGET of `fileUrl` answers, as GitHub's API needs to replace a file."
      },
      "FarmTokenRepoSummary": {
        "required": [
          "upToDateRepoNames",
          "outdatedRepoNames",
          "total"
        ],
        "type": "object",
        "properties": {
          "upToDateRepoNames": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The names of the update URLs whose file holds the farm's current connection details."
          },
          "outdatedRepoNames": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The names of the others, whose file is old, missing or out of reach."
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "How many update URLs the farm has.",
            "format": "int32"
          }
        },
        "description": "A server farm's update URLs, by whether they hold its current connection details."
      },
      "FarmTokenRepoUpdateParams": {
        "type": "object",
        "properties": {
          "repoName": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The update URL's new name."
          },
          "publishUrl": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfUri"
              }
            ],
            "description": "The new address apps read the file from."
          },
          "repoSettings": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfFarmTokenRepoSettings"
              }
            ],
            "description": "The new upload settings, all of them, or null to put the file there yourself."
          }
        },
        "description": "The fields of an update URL to change; one left out keeps its value."
      },
      "HostIp": {
        "required": [
          "ipAddress",
          "providerId",
          "providerName",
          "createdTime",
          "releaseRequestTime",
          "serverId",
          "isAdditional",
          "isHidden",
          "existsInProvider",
          "serverName",
          "serverLocation",
          "serverFarmId",
          "providerServerId",
          "serverFarmName",
          "status",
          "description",
          "providerDescription"
        ],
        "type": "object",
        "properties": {
          "ipAddress": {
            "description": "The IP address.",
            "$ref": "#/components/schemas/IPAddress"
          },
          "providerId": {
            "type": "string",
            "description": "The id of the hosting provider that has the IP."
          },
          "providerName": {
            "type": "string",
            "description": "The hosting provider's name."
          },
          "createdTime": {
            "type": "string",
            "description": "When the MANAGER first found the IP at the provider.",
            "format": "date-time"
          },
          "releaseRequestTime": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the IP's release was asked; null when it is not being released.",
            "format": "date-time"
          },
          "serverId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The id of the server with the IP in its access points; null when no server has it."
          },
          "isAdditional": {
            "type": "boolean",
            "description": "Whether the provider counts the IP as an additional one, beside a server's primary IP."
          },
          "isHidden": {
            "type": "boolean",
            "description": "Whether the IP is marked hidden: the list shows it last, and `isHidden` filters on it."
          },
          "existsInProvider": {
            "type": "boolean",
            "description": "Whether the provider still listed the IP at the last sync."
          },
          "serverName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The name of that server; null when no server has the IP."
          },
          "serverLocation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Location"
              }
            ],
            "description": "Where the IP address itself is, by country and region; null when that is not known."
          },
          "serverFarmId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The id of that server's farm; null when no server has the IP."
          },
          "providerServerId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The provider's id of the machine the IP is routed to; null when it is routed nowhere."
          },
          "serverFarmName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The name of that server's farm; null when no server has the IP."
          },
          "status": {
            "description": "Where the IP stands: in use, not in use, being released, or gone from the provider.",
            "$ref": "#/components/schemas/HostIpStatus"
          },
          "description": {
            "type": [
              "null",
              "string"
            ],
            "description": "Your own note on the IP, which the provider doesn't see; null when it has none."
          },
          "providerDescription": {
            "type": [
              "null",
              "string"
            ],
            "description": "The IP's description at the hosting provider; null when it has none."
          }
        },
        "description": "A host IP: an IP address at the project's hosting provider, used by one of the project's servers or routed to one."
      },
      "HostIpStatus": {
        "enum": [
          "NotInProvider",
          "NotInUse",
          "InUse",
          "Releasing"
        ],
        "description": "Where a host IP stands.\n\n- `NotInProvider`: The provider no longer lists the IP.\n- `NotInUse`: At the provider, but in no access point of the project's servers.\n- `InUse`: In an access point of one of the project's servers.\n- `Releasing`: Its release was asked: it serves until the provider deletes it when its paid time ends."
      },
      "HostIpUpdateParams": {
        "type": "object",
        "properties": {
          "isHidden": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfboolean"
              }
            ],
            "description": "Whether the IP is marked hidden."
          },
          "providerDescription": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The IP's new description at the hosting provider, which is changed there too."
          },
          "description": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "Your new note on the IP, which the provider doesn't see."
          }
        },
        "description": "The fields of a host IP to change; one left out keeps its value."
      },
      "HostOrder": {
        "required": [
          "orderId",
          "createdTime",
          "orderType",
          "status",
          "providerOrderId",
          "hostProviderId",
          "hostProviderName",
          "errorMessage",
          "completedTime",
          "newIpOrderIpAddress",
          "serverId",
          "serverName",
          "serverLocation",
          "serverFarmId",
          "serverFarmName"
        ],
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "description": "The order's id."
          },
          "createdTime": {
            "type": "string",
            "description": "When the order was placed.",
            "format": "date-time"
          },
          "orderType": {
            "description": "What the order is for.",
            "$ref": "#/components/schemas/HostOrderType"
          },
          "status": {
            "description": "Where the order stands.",
            "$ref": "#/components/schemas/HostOrderStatus"
          },
          "providerOrderId": {
            "type": "string",
            "description": "The provider's id for the order; empty when the provider never confirmed taking it."
          },
          "hostProviderId": {
            "type": "string",
            "description": "The id of the hosting provider the order went to."
          },
          "hostProviderName": {
            "type": "string",
            "description": "The hosting provider's name."
          },
          "errorMessage": {
            "type": [
              "null",
              "string"
            ],
            "description": "Why the order failed; null unless it did."
          },
          "completedTime": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the order completed or failed; null while it is pending.",
            "format": "date-time"
          },
          "newIpOrderIpAddress": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/IPAddress"
              }
            ],
            "description": "The IP address the order delivered; null until it completes."
          },
          "serverId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The id of the server the IP is for; null when that server's records are gone."
          },
          "serverName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The server's name."
          },
          "serverLocation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Location"
              }
            ],
            "description": "The server's location; null when it is not known."
          },
          "serverFarmId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The id of the server's farm."
          },
          "serverFarmName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The name of the server's farm."
          }
        },
        "description": "A host order: an order with the project's hosting provider for a new IP address for a server."
      },
      "HostOrderNewIp": {
        "required": [
          "serverId"
        ],
        "type": "object",
        "properties": {
          "serverId": {
            "type": "string",
            "description": "The id of the server to order the IP for."
          },
          "oldIpAddress": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/IPAddress"
              }
            ],
            "description": "A host IP of that server to replace: it is released once the new one arrives. Leave it out to add an IP."
          }
        },
        "description": "An order for a new IP address for a server."
      },
      "HostOrderStatus": {
        "enum": [
          "Pending",
          "Completed",
          "Failed"
        ],
        "description": "Where a host order stands.\n\n- `Pending`: Placed, and waiting for the provider to deliver the IP.\n- `Completed`: The IP arrived, and the server has it.\n- `Failed`: The provider refused the order, or no IP came within a day; `errorMessage` says which."
      },
      "HostOrderType": {
        "enum": [
          "NewIp"
        ],
        "description": "What a host order is for.\n\n- `NewIp`: A new IP address for a server, added or in place of one of its IPs."
      },
      "HttpAccessManagerOptions": {
        "required": [
          "baseUrl",
          "authorization"
        ],
        "type": "object",
        "properties": {
          "baseUrl": {
            "type": "string",
            "description": "Gets or sets the access manager's address, of which its scheme, host and port are used.",
            "format": "uri"
          },
          "authorization": {
            "type": "string",
            "description": "Gets or sets the value of the Authorization header, as a scheme and its credentials; one that does not parse is\nnot sent."
          }
        },
        "description": "Represents where an HTTP access manager is, and how the server proves itself to it."
      },
      "IPAddress": {
        "examples": [
          "192.168.1.10 or 2001:db8::1"
        ],
        "type": "string",
        "format": "ip"
      },
      "IpLock": {
        "type": "object",
        "properties": {
          "ipAddress": {
            "type": "string",
            "description": "The IP address."
          },
          "lockedTime": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the IP was locked; null when it is listed without a lock.",
            "format": "date-time"
          },
          "description": {
            "type": [
              "null",
              "string"
            ],
            "description": "A note about the IP; null when it has none."
          }
        },
        "description": "An IP address in the project's list of locked IPs."
      },
      "IpLockCreateParams": {
        "required": [
          "ipAddress"
        ],
        "type": "object",
        "properties": {
          "ipAddress": {
            "description": "The IP address, IPv4 or IPv6.",
            "$ref": "#/components/schemas/IPAddress"
          },
          "isLocked": {
            "type": "boolean",
            "description": "Whether to lock the IP now; leave it out to list it without a lock."
          },
          "description": {
            "type": [
              "null",
              "string"
            ],
            "description": "A note about the IP; leave it out for none."
          }
        },
        "description": "An IP address to add to the project's list of locked IPs."
      },
      "IpLockUpdateParams": {
        "type": "object",
        "properties": {
          "isLocked": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfboolean"
              }
            ],
            "description": "`true` locks an IP that is not locked, from now; `false` unlocks it, and so does `true` on an IP\nthat is already locked."
          },
          "description": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The new note."
          }
        },
        "description": "The fields of a locked IP to change; one left out keeps its value."
      },
      "ListResultOfAccessData": {
        "required": [
          "items",
          "totalCount"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccessData"
            },
            "description": "The items of this page."
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "How many items match, on every page together.",
            "format": "int32"
          }
        },
        "description": "One page of a list, and how many items match in all."
      },
      "ListResultOfAccessTokenData": {
        "required": [
          "items",
          "totalCount"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccessTokenData"
            },
            "description": "The items of this page."
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "How many items match, on every page together.",
            "format": "int32"
          }
        },
        "description": "One page of a list, and how many items match in all."
      },
      "ListResultOfTeamUserRole": {
        "required": [
          "items",
          "totalCount"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamUserRole"
            },
            "description": "The items of this page."
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "How many items match, on every page together.",
            "format": "int32"
          }
        },
        "description": "One page of a list, and how many items match in all."
      },
      "Location": {
        "required": [
          "countryCode",
          "regionName",
          "cityName"
        ],
        "type": "object",
        "properties": {
          "countryCode": {
            "type": "string",
            "description": "The country's two-letter code, such as `US`."
          },
          "regionName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The region, such as a state or a province; null when not known."
          },
          "cityName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The city; null when not known."
          },
          "countryName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The country's name in English, or its code when the name is not known."
          },
          "displayName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The place in one line, as the panel shows it: the country's name, then the region and city in parentheses where\nknown, as in `United States (California/Los Angeles)`."
          }
        },
        "description": "Where a server or a device is, as found from its IP address."
      },
      "PasswordAccountParams": {
        "required": [
          "email",
          "password",
          "continueUrl"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "The account's email address."
          },
          "password": {
            "type": "string",
            "description": "The account's password; for a new account, a weak one fails with `WeakPassword`."
          },
          "continueUrl": {
            "type": "string",
            "description": "Where the email's link leads once the email is verified.",
            "format": "uri"
          }
        },
        "description": "An account's email and password, and where its verification email's link leads."
      },
      "PasswordResetEmailParams": {
        "required": [
          "email",
          "continueUrl"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "The account's email address."
          },
          "continueUrl": {
            "type": "string",
            "description": "Where the email's link leads once the new password is set.",
            "format": "uri"
          }
        },
        "description": "The account to send a password reset email to."
      },
      "PasswordResetParams": {
        "required": [
          "code",
          "newPassword"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The code from the reset email's link: its `oobCode` parameter."
          },
          "newPassword": {
            "type": "string",
            "description": "The new password; a weak one fails with `WeakPassword`."
          }
        },
        "description": "The code from a password reset email, and the new password."
      },
      "PasswordSignInParams": {
        "required": [
          "email",
          "password"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "The account's email address."
          },
          "password": {
            "type": "string",
            "description": "The account's password."
          }
        },
        "description": "An account's email and password, to sign in with."
      },
      "PasswordSignInResult": {
        "required": [
          "idToken",
          "isEmailVerified"
        ],
        "type": "object",
        "properties": {
          "idToken": {
            "type": "string",
            "description": "The id token that `POST /api/authentication/signin` takes once the email is verified."
          },
          "isEmailVerified": {
            "type": "boolean",
            "description": "Whether the account's email is verified; until it is, the id token does not sign in."
          }
        },
        "description": "An account's id token, which signs in once its email is verified."
      },
      "PatchOfAccessPoint[]": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AccessPoint"
            },
            "description": "The field's new value."
          }
        },
        "description": "A change to one field, as `{ \"value\": ... }`. Leave the field out to keep its value."
      },
      "PatchOfAdRequirement": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "description": "The field's new value.",
            "$ref": "#/components/schemas/AdRequirement"
          }
        },
        "description": "A change to one field, as `{ \"value\": ... }`. Leave the field out to keep its value."
      },
      "PatchOfboolean": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": "boolean",
            "description": "The field's new value."
          }
        },
        "description": "A change to one field, as `{ \"value\": ... }`. Leave the field out to keep its value."
      },
      "PatchOfByte[]": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": [
              "null",
              "string"
            ],
            "description": "The field's new value.",
            "format": "byte"
          }
        },
        "description": "A change to one field, as `{ \"value\": ... }`. Leave the field out to keep its value."
      },
      "PatchOfClientPolicy[]": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ClientPolicy"
            },
            "description": "The field's new value."
          }
        },
        "description": "A change to one field, as `{ \"value\": ... }`. Leave the field out to keep its value."
      },
      "PatchOfDateTime": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": [
              "null",
              "string"
            ],
            "description": "The field's new value.",
            "format": "date-time"
          }
        },
        "description": "A change to one field, as `{ \"value\": ... }`. Leave the field out to keep its value."
      },
      "PatchOfDomainVisibility": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "description": "The field's new value.",
            "$ref": "#/components/schemas/DomainVisibility"
          }
        },
        "description": "A change to one field, as `{ \"value\": ... }`. Leave the field out to keep its value."
      },
      "PatchOfFarmTokenRepo[]": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/FarmTokenRepo"
            },
            "description": "The field's new value."
          }
        },
        "description": "A change to one field, as `{ \"value\": ... }`. Leave the field out to keep its value."
      },
      "PatchOfFarmTokenRepoSettings": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "description": "The field's new value.",
            "$ref": "#/components/schemas/FarmTokenRepoSettings"
          }
        },
        "description": "A change to one field, as `{ \"value\": ... }`. Leave the field out to keep its value."
      },
      "PatchOfint": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The field's new value.",
            "format": "int32"
          }
        },
        "description": "A change to one field, as `{ \"value\": ... }`. Leave the field out to keep its value."
      },
      "PatchOfSigningType": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "description": "The field's new value.",
            "$ref": "#/components/schemas/SigningType"
          }
        },
        "description": "A change to one field, as `{ \"value\": ... }`. Leave the field out to keep its value."
      },
      "PatchOfstring": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": [
              "null",
              "string"
            ],
            "description": "The field's new value."
          }
        },
        "description": "A change to one field, as `{ \"value\": ... }`. Leave the field out to keep its value."
      },
      "PatchOfString[]": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            },
            "description": "The field's new value."
          }
        },
        "description": "A change to one field, as `{ \"value\": ... }`. Leave the field out to keep its value."
      },
      "PatchOfUri": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": [
              "null",
              "string"
            ],
            "description": "The field's new value.",
            "format": "uri"
          }
        },
        "description": "A change to one field, as `{ \"value\": ... }`. Leave the field out to keep its value."
      },
      "Project": {
        "required": [
          "projectId",
          "projectName",
          "createdTime",
          "subscriptionType",
          "gaMeasurementId",
          "gaApiSecret",
          "rewardedAdSecret",
          "rewardedAdUrl",
          "hastHostProvider"
        ],
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "description": "The project's id, as in its address in the panel."
          },
          "projectName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The project's name; null until one is given."
          },
          "createdTime": {
            "type": "string",
            "description": "When the project was created.",
            "format": "date-time"
          },
          "subscriptionType": {
            "description": "The project's plan, which sets its limits.",
            "$ref": "#/components/schemas/SubscriptionType"
          },
          "gaMeasurementId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The Google Analytics 4 measurement id the project keeps for its apps."
          },
          "gaApiSecret": {
            "type": [
              "null",
              "string"
            ],
            "description": "The Google Analytics 4 API secret the project keeps; null for a caller who may not change the project."
          },
          "rewardedAdSecret": {
            "type": [
              "null",
              "string"
            ],
            "description": "The secret in `rewardedAdUrl`; null for a caller who may not change the project."
          },
          "rewardedAdUrl": {
            "type": [
              "null",
              "string"
            ],
            "description": "The address to give your ad network for its server-side verification of rewarded ads, which credits a session\nthat needs an ad; null for a caller who may not change the project.",
            "format": "uri"
          },
          "hastHostProvider": {
            "type": "boolean",
            "description": "Whether a hosting provider is set up for the project, to order IP addresses for its servers."
          }
        },
        "description": "A project: the home of its server farms, servers, access keys and team."
      },
      "ProjectUpdateParams": {
        "type": "object",
        "properties": {
          "projectName": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The project's new name."
          },
          "gaMeasurementId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The Google Analytics 4 measurement id to keep."
          },
          "gaApiSecret": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The Google Analytics 4 API secret to keep."
          },
          "rewardedAdSecret": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "A new secret for `rewardedAdUrl`: the old address stops working, so give your ad network the new one."
          }
        },
        "description": "The fields of a project to change; one left out keeps its value."
      },
      "RefreshTokenRequest": {
        "required": [
          "refreshToken"
        ],
        "type": "object",
        "properties": {
          "refreshToken": {
            "type": "string"
          }
        }
      },
      "RefreshTokenType": {
        "enum": [
          "None",
          "Web",
          "App"
        ]
      },
      "Role": {
        "required": [
          "roleId",
          "roleName"
        ],
        "type": "object",
        "properties": {
          "roleId": {
            "type": "string"
          },
          "roleName": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ServerCreateParams": {
        "required": [
          "serverFarmId"
        ],
        "type": "object",
        "properties": {
          "serverName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The server's name, unique in the project; leave it out for `Server ##`. In any name, `##` becomes the\nfirst number that makes it unique."
          },
          "serverFarmId": {
            "type": "string",
            "description": "The id of the server farm it is for."
          },
          "hostPanelUrl": {
            "type": [
              "null",
              "string"
            ],
            "description": "The address of the server's control panel at its hosting provider, for you to open.",
            "format": "uri"
          },
          "accessPoints": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AccessPoint"
            },
            "description": "The server's access points, up to 10; leave them out to have the MANAGER set them from the server's own\naddresses (`autoConfigure` on)."
          },
          "power": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The server's weight against the farm's other servers, 1 or more; leave it out for its logical cores.",
            "format": "int32"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The server's tags, such as `#premium`; a missing `#` is added."
          },
          "clientFilterId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The id of a client filter, so the server serves only the clients it matches; leave it out for all clients."
          }
        },
        "description": "A server to add."
      },
      "ServerData": {
        "required": [
          "server"
        ],
        "type": "object",
        "properties": {
          "server": {
            "description": "The server.",
            "$ref": "#/components/schemas/VpnServer"
          }
        },
        "description": "A server, with its state and last status."
      },
      "ServerFarm": {
        "required": [
          "serverFarmName",
          "serverProfileName",
          "tokenError",
          "secret",
          "createdTime",
          "pushTokenToClient",
          "allowAccessCode"
        ],
        "type": "object",
        "properties": {
          "serverFarmId": {
            "type": "string",
            "description": "The server farm's id."
          },
          "serverProfileId": {
            "type": "string",
            "description": "The id of the server profile its servers run with."
          },
          "serverFarmName": {
            "type": "string",
            "description": "The farm's name, unique in the project."
          },
          "serverProfileName": {
            "type": "string",
            "description": "The name of that server profile."
          },
          "tokenError": {
            "type": [
              "null",
              "string"
            ],
            "description": "Why the MANAGER could not build the farm's connection details at its last change, such as no\n`PublicInToken` address beside a self-signed certificate; null when they are current. Until then, access\nkeys and apps get the last ones that worked."
          },
          "secret": {
            "type": [
              "null",
              "string"
            ],
            "description": "The farm's secret, 16 bytes in Base64: every access key of the farm carries it, apps prove themselves to its\nservers with it, and it encrypts the update file. Null for a caller who may not read access keys\n(`AccessTokenReadAccessKey`).",
            "format": "byte"
          },
          "createdTime": {
            "type": "string",
            "description": "When the farm was created.",
            "format": "date-time"
          },
          "pushTokenToClient": {
            "type": "boolean",
            "description": "Whether the MANAGER pushes updates to clients: apps get the farm's current connection details as they connect,\nso their access keys keep up with changes. They get them only while every enabled server with a\n`PublicInToken` address is up, unless the keys carry a domain alone."
          },
          "allowAccessCode": {
            "type": "boolean",
            "description": "Whether the farm's access keys have premium codes, which users type into the app to connect with a key in place\nof another. Turning it on gives each of its keys one; turning it off hides them from the API, though the codes\nalready given keep working."
          }
        },
        "description": "A server farm: servers that share access keys, a server profile, and the certificate in their keys."
      },
      "ServerFarmCreateParams": {
        "type": "object",
        "properties": {
          "serverFarmName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The farm's name, unique in the project; leave it out for `Server Farm ##`. In any name, `##` becomes\nthe first number that makes it unique."
          },
          "serverProfileId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The id of the server profile its servers run with; leave it out for the project's default."
          }
        },
        "description": "A server farm to create."
      },
      "ServerFarmData": {
        "required": [
          "serverFarm",
          "endPoints",
          "farmTokenRepoNames",
          "serverCount",
          "accessTokenSummary"
        ],
        "type": "object",
        "properties": {
          "serverFarm": {
            "description": "The server farm.",
            "$ref": "#/components/schemas/ServerFarm"
          },
          "endPoints": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The addresses in the farm's connection details, each as host:port, an IPv6 address without brackets: the domain\nof the certificate in its keys first, when that is CA signed or `DomainOnly`, then its servers'\n`PublicInToken` addresses. Empty while the farm has no connection details."
          },
          "farmTokenRepoNames": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            },
            "description": "The names of the farm's update URLs."
          },
          "serverCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "How many servers the farm has; null unless `includeSummary` was asked for.",
            "format": "int32"
          },
          "accessTokenSummary": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AccessTokenSummary"
              }
            ],
            "description": "How many access keys the farm has, by use; null unless `includeSummary` was asked for."
          }
        },
        "description": "A server farm, with the addresses in its connection details, its update URLs, and its counts when asked for."
      },
      "ServerFarmSummary": {
        "required": [
          "serverFarm",
          "accessTokenSummary",
          "serverCount"
        ],
        "type": "object",
        "properties": {
          "serverFarm": {
            "description": "The server farm.",
            "$ref": "#/components/schemas/ServerFarm"
          },
          "accessTokenSummary": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AccessTokenSummary"
              }
            ],
            "description": "How many access keys the farm has, by use; null unless `includeSummary` was asked for."
          },
          "serverCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "How many servers the farm has; null unless `includeSummary` was asked for.",
            "format": "int32"
          }
        },
        "description": "A server farm in a list, with its counts when asked for."
      },
      "ServerFarmUpdateParams": {
        "type": "object",
        "properties": {
          "serverFarmName": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The farm's new name, unique in the project."
          },
          "serverProfileId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The id of the server profile its servers are to run with."
          },
          "secret": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfByte[]"
              }
            ],
            "description": "The farm's new secret, 16 random bytes in Base64; access keys copied before it stop working in current apps."
          },
          "pushTokenToClient": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfboolean"
              }
            ],
            "description": "Whether to push updates to clients: apps get the farm's current connection details as they connect."
          },
          "allowAccessCode": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfboolean"
              }
            ],
            "description": "Whether the farm's keys are to have premium codes; on, each key that lacks one gets one."
          },
          "tokenRepos": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfFarmTokenRepo[]"
              }
            ],
            "description": "Ignored: change the farm's update URLs under `.../server-farms/{serverFarmId}/farm-token-repos`."
          }
        },
        "description": "The fields of a server farm to change; one left out keeps its value."
      },
      "ServerInstallAppSettings": {
        "required": [
          "httpAccessManager",
          "managementSecret"
        ],
        "type": "object",
        "properties": {
          "httpAccessManager": {
            "description": "Where the server reaches the MANAGER, and the authorization it sends there: the server's credentials, which work\nuntil the server is deleted.",
            "$ref": "#/components/schemas/HttpAccessManagerOptions"
          },
          "managementSecret": {
            "type": "string",
            "description": "The server's management secret, in Base64; VpnHood! SERVER keeps it but does not use it.",
            "format": "byte"
          }
        },
        "description": "The settings that connect VpnHood! SERVER to the MANAGER, as its `appsettings.json` holds them."
      },
      "ServerInstallBySshUserKeyParams": {
        "required": [
          "hostName",
          "hostPort",
          "loginUserName",
          "userPrivateKey"
        ],
        "type": "object",
        "properties": {
          "hostName": {
            "type": "string",
            "description": "The machine's public IP address, or a name that points to it."
          },
          "hostPort": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The machine's SSH port, usually 22; 0 means 22.",
            "format": "int32"
          },
          "loginUserName": {
            "type": "string",
            "description": "The account to sign in with: root, or one that may use sudo."
          },
          "loginPassword": {
            "type": [
              "null",
              "string"
            ],
            "description": "The account's password, for sudo to ask for; leave it out where sudo asks none."
          },
          "userPrivateKey": {
            "type": "string",
            "description": "The account's SSH private key file, in Base64.",
            "format": "byte"
          },
          "userPrivateKeyPassphrase": {
            "type": [
              "null",
              "string"
            ],
            "description": "The key's passphrase; leave it out for a key without one."
          }
        },
        "description": "The machine to install a server on, and the account and SSH key to sign in with."
      },
      "ServerInstallBySshUserPasswordParams": {
        "required": [
          "hostName",
          "hostPort",
          "loginUserName",
          "loginPassword"
        ],
        "type": "object",
        "properties": {
          "hostName": {
            "type": "string",
            "description": "The machine's public IP address, or a name that points to it."
          },
          "hostPort": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The machine's SSH port, usually 22; 0 means 22.",
            "format": "int32"
          },
          "loginUserName": {
            "type": "string",
            "description": "The account to sign in with: root, or one that may use sudo."
          },
          "loginPassword": {
            "type": "string",
            "description": "The account's password, for SSH and for sudo."
          }
        },
        "description": "The machine to install a server on, and the account and password to sign in with."
      },
      "ServerInstallManual": {
        "required": [
          "appSettings",
          "linuxCommand",
          "windowsCommand"
        ],
        "type": "object",
        "properties": {
          "appSettingsJson": {
            "type": [
              "null",
              "string"
            ],
            "description": "The settings that connect the server to the MANAGER, as the text of its `appsettings.json`."
          },
          "appSettings": {
            "description": "The same settings, as an object.",
            "$ref": "#/components/schemas/ServerInstallAppSettings"
          },
          "linuxCommand": {
            "type": "string",
            "description": "One command to run on a Linux machine: it installs VpnHood! SERVER with these settings."
          },
          "windowsCommand": {
            "type": "string",
            "description": "One command to run in PowerShell, as an administrator, on a Windows machine: it installs VpnHood! SERVER with\nthese settings."
          }
        },
        "description": "How to install VpnHood! SERVER on a machine yourself, connected to the MANAGER. Keep it private: it holds the\nserver's credentials."
      },
      "ServerProfile": {
        "required": [
          "serverProfileId",
          "serverProfileName",
          "isDefault",
          "createdTime",
          "serverConfig",
          "maxPremiumSessionsPerPower",
          "maxNormalSessionsPerPower"
        ],
        "type": "object",
        "properties": {
          "serverProfileId": {
            "type": "string",
            "description": "The server profile's id."
          },
          "serverProfileName": {
            "type": "string",
            "description": "The profile's name, unique in the project."
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether it is the project's default profile, which a new server farm uses unless given another; it can be\nneither renamed nor deleted."
          },
          "createdTime": {
            "type": "string",
            "description": "When the profile was created.",
            "format": "date-time"
          },
          "serverConfig": {
            "type": [
              "null",
              "string"
            ],
            "description": "The servers' settings, as JSON text: VpnHood! SERVER's `ServerConfig`, under the same names as in a\nstandalone server's `appsettings.json`. Null for the defaults."
          },
          "maxPremiumSessionsPerPower": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The most sessions a server with the `#premium` tag takes per unit of its power, beyond which it gets no new\nsession; null for no limit.",
            "format": "int32"
          },
          "maxNormalSessionsPerPower": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The most sessions any other server takes per unit of its power; null for no limit.",
            "format": "int32"
          }
        },
        "description": "A server profile: the settings that the servers of the farms using it run with."
      },
      "ServerProfileCreateParams": {
        "type": "object",
        "properties": {
          "serverProfileName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The profile's name, unique in the project; leave it out for `Server Profile ##`. In any name, `##`\nbecomes the first number that makes it unique."
          },
          "serverConfig": {
            "type": [
              "null",
              "string"
            ],
            "description": "The servers' settings as JSON text, as in `serverConfig` of a profile; leave it out for the defaults. The\nsettings the MANAGER sets for each server are refused: `TcpEndPoints`, `UpdateStatusInterval`,\n`ServerSecret`, `ConfigCode`, and the session's `Timeout`, `SyncInterval` and\n`SyncCacheSize`. `UdpEndPoints` and `QuicEndPoints` take only `[]`, which turns UDP or QUIC\noff. A setting the MANAGER doesn't know is dropped."
          }
        },
        "description": "A server profile to create."
      },
      "ServerProfileData": {
        "required": [
          "serverProfile"
        ],
        "type": "object",
        "properties": {
          "serverProfile": {
            "description": "The server profile.",
            "$ref": "#/components/schemas/ServerProfile"
          },
          "summary": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ServerProfileSummary"
              }
            ],
            "description": "How the profile is used; null unless `includeSummary` was asked for."
          }
        },
        "description": "A server profile, with its summary when asked for."
      },
      "ServerProfileSummary": {
        "required": [
          "serverFarmCount"
        ],
        "type": "object",
        "properties": {
          "serverFarmCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "How many of the project's server farms use it.",
            "format": "int32"
          }
        },
        "description": "How a server profile is used."
      },
      "ServerProfileUpdateParams": {
        "type": "object",
        "properties": {
          "serverProfileName": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The profile's new name, unique in the project; the default profile can't be renamed."
          },
          "serverConfig": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The servers' new settings as JSON text, under the same rules as a new profile's, or null for the defaults."
          },
          "maxNormalSessionsPerPower": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfint"
              }
            ],
            "description": "The new most sessions per power of a server without the `#premium` tag, or null for no limit."
          },
          "maxPremiumSessionsPerPower": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfint"
              }
            ],
            "description": "The new most sessions per power of a server with the `#premium` tag, or null for no limit."
          }
        },
        "description": "The fields of a server profile to change; one left out keeps its value."
      },
      "ServersStatusSummary": {
        "type": "object",
        "properties": {
          "totalServerCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "All the servers counted, those in `Error` or `Configuring` too, which no other count has.",
            "format": "int32"
          },
          "activeServerCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The servers that work, with sessions.",
            "format": "int32"
          },
          "idleServerCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The servers that work, with no session.",
            "format": "int32"
          },
          "lostServerCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The servers that have stopped reporting.",
            "format": "int32"
          },
          "disabledServerCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The servers that report but are disabled.",
            "format": "int32"
          },
          "notInstalledServerCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The servers that have not reached the MANAGER yet.",
            "format": "int32"
          },
          "sessionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The active servers' open sessions.",
            "format": "int32"
          },
          "tunnelSendSpeed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The speed the active servers' tunnels send at, together, in bytes per second.",
            "format": "int64"
          },
          "tunnelReceiveSpeed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The speed the active servers' tunnels receive at, together, in bytes per second.",
            "format": "int64"
          },
          "usingBandwidth": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Meant as the bandwidth the active servers use, in bytes per second: it is four times `tunnelReceiveSpeed`,\nas `tunnelSendSpeed` is left out.",
            "format": "int64"
          }
        },
        "description": "How many servers are in each state, and what the active ones carry."
      },
      "ServerState": {
        "enum": [
          "NotInstalled",
          "Disabled",
          "Lost",
          "Error",
          "Configuring",
          "Idle",
          "Active"
        ],
        "description": "A server's state, from its reports to the MANAGER.\n\n- `NotInstalled`: It has not reached the MANAGER yet.\n- `Disabled`: It reports, but `isEnabled` is off, so it gets no new sessions.\n- `Lost`: It has sent no status for over three minutes, so it gets no new sessions.\n- `Error`: It could not use its settings, so it gets no new sessions; `lastConfigError` says why.\n- `Configuring`: It is taking new settings, which takes a minute or two; it still gets new sessions.\n- `Idle`: It works, with no session.\n- `Active`: It works, with sessions."
      },
      "ServerStatusEx": {
        "required": [
          "sessionCount",
          "tcpConnectionCount",
          "udpConnectionCount",
          "availableMemory",
          "availableSwapMemoryMb",
          "cpuUsage",
          "threadCount",
          "tunnelSendSpeed",
          "tunnelReceiveSpeed",
          "createdTime"
        ],
        "type": "object",
        "properties": {
          "sessionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The server's open sessions.",
            "format": "int32"
          },
          "tcpConnectionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Its sessions' TCP streams: the TCP connections it forwards and its tunnels' own, those over QUIC too.",
            "format": "int32"
          },
          "udpConnectionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The UDP connections it opens for its sessions.",
            "format": "int32"
          },
          "availableMemory": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The machine's available memory, in bytes; null where not known.",
            "format": "int64"
          },
          "availableSwapMemoryMb": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The machine's free swap, in megabytes; null where the server does not manage swap (it does on Linux).",
            "format": "int32"
          },
          "cpuUsage": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The machine's CPU use, in percent; null where not known.",
            "format": "int32"
          },
          "threadCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The server process's threads.",
            "format": "int32"
          },
          "tunnelSendSpeed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The speed its tunnels send at, in bytes per second.",
            "format": "int64"
          },
          "tunnelReceiveSpeed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The speed its tunnels receive at, in bytes per second.",
            "format": "int64"
          },
          "createdTime": {
            "type": "string",
            "description": "When the report came in.",
            "format": "date-time"
          }
        },
        "description": "A server's last status report, which it sends about every minute."
      },
      "ServerStatusHistory": {
        "type": "object",
        "properties": {
          "time": {
            "type": "string",
            "description": "The start of the step.",
            "format": "date-time"
          },
          "sessionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The most sessions the servers had open together in the step.",
            "format": "int32"
          },
          "tunnelTransferSpeed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The servers' top tunnel speed together in the step, sent and received, in bytes per second.",
            "format": "int64"
          },
          "serverCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Not counted: always 0.",
            "format": "int32"
          },
          "cpuUsage": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The server's top CPU use in the step, in percent; 0 unless `serverId` is given.",
            "format": "int32"
          },
          "availableMemory": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The server's least available memory in the step, in bytes; 0 unless `serverId` is given.",
            "format": "int64"
          }
        },
        "description": "The servers' load in one step of a period; a step in which no server reported has zeros."
      },
      "ServerUpdateParams": {
        "type": "object",
        "properties": {
          "serverName": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The server's new name, unique in the project."
          },
          "serverFarmId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The id of the server farm to move the server to; refused while the server has certificates of its own."
          },
          "generateNewSecret": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfboolean"
              }
            ],
            "description": "`true` to give the server a new management secret, which its install commands carry from then on;\nVpnHood! SERVER does not use it."
          },
          "autoConfigure": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfboolean"
              }
            ],
            "description": "Whether the MANAGER is to set the server's access points by itself."
          },
          "accessPoints": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfAccessPoint[]"
              }
            ],
            "description": "The server's new access points, up to 10. They turn `autoConfigure` off, unless the same request sets it\non: then the MANAGER rebuilds them from the server's own addresses, keeping their ports."
          },
          "allowInAutoLocation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfboolean"
              }
            ],
            "description": "Whether apps that leave their location on Auto may be sent to the server."
          },
          "hostPanelUrl": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfUri"
              }
            ],
            "description": "The new address of the server's control panel at its hosting provider, or null for none."
          },
          "power": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfint"
              }
            ],
            "description": "The server's new weight against the farm's other servers, 1 or more, or null for its logical cores."
          },
          "isEnabled": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfboolean"
              }
            ],
            "description": "Whether the server is to take new sessions."
          },
          "tags": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfString[]"
              }
            ],
            "description": "The server's new tags, all of them; a missing `#` is added."
          },
          "clientFilterId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "The id of the server's new client filter, or null for none."
          },
          "configSwapMemorySizeMb": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfint"
              }
            ],
            "description": "The swap the server is to have in all, in megabytes, from 10 to 100,000, or null for its server profile's\nsetting."
          }
        },
        "description": "The fields of a server to change; one left out keeps its value."
      },
      "SigningType": {
        "enum": [
          "Manual",
          "AutoSign",
          "DomainOnly"
        ],
        "description": "How a certificate gets signed: the panel's Signing.\n\n- `Manual`: The MANAGER leaves it as it is.\n- `AutoSign`: The MANAGER has Let's Encrypt sign it, and renews it about 30 days before it expires. Let's Encrypt checks the\ndomain over plain HTTP on TCP port 80, so the domain must point at one of the farm's servers, with that port\nopen. A failed attempt is tried again about once a day; after 6 failures in a row it goes back to\n`Manual`.\n- `DomainOnly`: For a domain whose certificate lives elsewhere, such as a CDN's in front of the servers: the servers never get\nit, and in the keys it gives apps the domain alone, on port 443."
      },
      "SignInRequest": {
        "required": [
          "idToken"
        ],
        "type": "object",
        "properties": {
          "idToken": {
            "type": "string"
          },
          "refreshTokenType": {
            "$ref": "#/components/schemas/RefreshTokenType"
          }
        }
      },
      "SignUpRequest": {
        "required": [
          "idToken"
        ],
        "type": "object",
        "properties": {
          "idToken": {
            "type": "string"
          },
          "refreshTokenType": {
            "$ref": "#/components/schemas/RefreshTokenType"
          }
        }
      },
      "SubscriptionType": {
        "enum": [
          "Free",
          "Unlimited"
        ],
        "description": "A project's plan.\n\n- `Free`: The free plan: it caps how many server farms, servers, access keys, profiles, groups, certificates and client\nfilters a project has, and how long a period a usage report covers.\n- `Unlimited`: The plan without those caps."
      },
      "TeamAddBotParam": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "TeamAddEmailParam": {
        "type": "object"
      },
      "TeamUpdateBotParam": {
        "type": "object",
        "properties": {
          "name": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PatchOfstring"
              }
            ],
            "description": "A change to one field, as `{ \"value\": ... }`. Leave the field out to keep its value."
          }
        }
      },
      "TeamUserOfUserAndRole": {
        "required": [
          "user",
          "roles"
        ],
        "type": "object",
        "properties": {
          "user": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/User"
              }
            ]
          },
          "roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Role"
            }
          }
        }
      },
      "TeamUserRole": {
        "required": [
          "user",
          "resourceId",
          "userId",
          "role",
          "confirmedTime"
        ],
        "type": "object",
        "properties": {
          "user": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/User"
              }
            ]
          },
          "resourceId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/Role"
          },
          "confirmedTime": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "Token": {
        "required": [
          "value",
          "expirationTime",
          "scheme",
          "issuedTime"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "expirationTime": {
            "type": "string",
            "format": "date-time"
          },
          "scheme": {
            "type": "string"
          },
          "issuedTime": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Traffic": {
        "type": "object",
        "properties": {
          "sent": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Gets the amount sent.",
            "format": "int64"
          },
          "received": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Gets the amount received.",
            "format": "int64"
          }
        },
        "description": "Represents an amount each way: bytes, or a rate where a member says so."
      },
      "TrafficUsage": {
        "type": "object",
        "properties": {
          "sentTraffic": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The bytes the device sent through the VPN in the period.",
            "format": "int64"
          },
          "receivedTraffic": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The bytes the device received through the VPN in the period.",
            "format": "int64"
          },
          "lastUsedTime": {
            "type": "string",
            "description": "When the device last used the VPN in the period, by its server's last usage report.",
            "format": "date-time"
          }
        },
        "description": "A device's traffic over a period."
      },
      "UploadMethod": {
        "enum": [
          "None",
          "Post",
          "Put",
          "PutPost"
        ],
        "description": "How the MANAGER uploads a farm's update file to an update URL: the panel's Auto Upload.\n\n- `None`: It doesn't: you put the file there yourself, again after every change.\n- `Post`: With an HTTP POST to the file URL.\n- `Put`: With an HTTP PUT to the file URL.\n- `PutPost`: With an HTTP PUT, then a POST if the PUT fails."
      },
      "Usage": {
        "required": [
          "sentTraffic",
          "receivedTraffic",
          "deviceCount",
          "serverCount",
          "sessionCount",
          "accessTokenCount",
          "countryCount"
        ],
        "type": "object",
        "properties": {
          "sentTraffic": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The bytes the devices sent through the VPN in the period.",
            "format": "int64"
          },
          "receivedTraffic": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The bytes the devices received through the VPN in the period.",
            "format": "int64"
          },
          "deviceCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "How many devices used the VPN in the period.",
            "format": "int32"
          },
          "serverCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "Not counted: null, or 0 when there was no usage.",
            "format": "int32"
          },
          "sessionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "Not counted: always null.",
            "format": "int32"
          },
          "accessTokenCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "1 in an access key's usage, which is of that key alone; null elsewhere.",
            "format": "int32"
          },
          "countryCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "Not counted: always null.",
            "format": "int32"
          }
        },
        "description": "The traffic and devices over a period."
      },
      "User": {
        "required": [
          "userId",
          "email",
          "name",
          "firstName",
          "lastName",
          "pictureUrl",
          "phone",
          "createdTime",
          "accessedTime",
          "authorizationCode",
          "isDisabled",
          "isEmailVerified",
          "isPhoneVerified",
          "isBot",
          "description",
          "exData"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "firstName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ]
          },
          "pictureUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "phone": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdTime": {
            "type": "string",
            "format": "date-time"
          },
          "accessedTime": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "authorizationCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "isDisabled": {
            "type": "boolean"
          },
          "isEmailVerified": {
            "type": "boolean"
          },
          "isPhoneVerified": {
            "type": "boolean"
          },
          "isBot": {
            "type": "boolean"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "exData": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UserProject": {
        "required": [
          "confirmedTime",
          "projectId",
          "projectName",
          "createdTime",
          "subscriptionType",
          "gaMeasurementId",
          "gaApiSecret",
          "rewardedAdSecret",
          "rewardedAdUrl",
          "hastHostProvider"
        ],
        "type": "object",
        "properties": {
          "confirmedTime": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the caller first opened the project; null until then, as just after someone added them to its team.",
            "format": "date-time"
          },
          "projectId": {
            "type": "string",
            "description": "The project's id, as in its address in the panel."
          },
          "projectName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The project's name; null until one is given."
          },
          "createdTime": {
            "type": "string",
            "description": "When the project was created.",
            "format": "date-time"
          },
          "subscriptionType": {
            "description": "The project's plan, which sets its limits.",
            "$ref": "#/components/schemas/SubscriptionType"
          },
          "gaMeasurementId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The Google Analytics 4 measurement id the project keeps for its apps."
          },
          "gaApiSecret": {
            "type": [
              "null",
              "string"
            ],
            "description": "The Google Analytics 4 API secret the project keeps; null for a caller who may not change the project."
          },
          "rewardedAdSecret": {
            "type": [
              "null",
              "string"
            ],
            "description": "The secret in `rewardedAdUrl`; null for a caller who may not change the project."
          },
          "rewardedAdUrl": {
            "type": [
              "null",
              "string"
            ],
            "description": "The address to give your ad network for its server-side verification of rewarded ads, which credits a session\nthat needs an ad; null for a caller who may not change the project.",
            "format": "uri"
          },
          "hastHostProvider": {
            "type": "boolean",
            "description": "Whether a hosting provider is set up for the project, to order IP addresses for its servers."
          }
        },
        "description": "A project in the caller's own list."
      },
      "VpnServer": {
        "required": [
          "serverId",
          "serverName",
          "serverFarmId",
          "serverFarmName",
          "location",
          "version",
          "environmentVersion",
          "osInfo",
          "tcpCongestionControl",
          "machineName",
          "totalMemory",
          "totalSwapMemoryMb",
          "logicalCoreCount",
          "configureTime",
          "createdTime",
          "autoConfigure",
          "isEnabled",
          "description",
          "lastConfigError",
          "serverState",
          "serverStatus",
          "accessPoints",
          "allowInAutoLocation",
          "hostPanelUrl",
          "power",
          "publicIpV4",
          "publicIpV6",
          "tags",
          "clientFilterId",
          "clientFilterName",
          "configSwapMemorySizeMb"
        ],
        "type": "object",
        "properties": {
          "serverId": {
            "type": "string",
            "description": "The server's id."
          },
          "serverName": {
            "type": "string",
            "description": "The server's name, unique in the project."
          },
          "serverFarmId": {
            "type": "string",
            "description": "The id of the server farm it belongs to."
          },
          "serverFarmName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The name of that server farm."
          },
          "location": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Location"
              }
            ],
            "description": "Where the server is, found from its public IP address when it first took its settings; null until then, or when\nthat address could not be located."
          },
          "version": {
            "type": [
              "null",
              "string"
            ],
            "description": "The version of VpnHood! SERVER it runs; null until it first connects."
          },
          "environmentVersion": {
            "type": [
              "null",
              "string"
            ],
            "description": "The version of the .NET runtime it runs on; null until it first connects."
          },
          "osInfo": {
            "type": [
              "null",
              "string"
            ],
            "description": "The machine and its OS, as the server describes them; null until it first connects."
          },
          "tcpCongestionControl": {
            "type": [
              "null",
              "string"
            ],
            "description": "The TCP congestion control the machine's OS runs, such as `bbr`; null where the server does not manage its\nnetwork (it does on Linux)."
          },
          "machineName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The machine's name; null until the server first connects."
          },
          "totalMemory": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The machine's memory, in bytes; null until the server first connects, and 0 where it could not tell.",
            "format": "int64"
          },
          "totalSwapMemoryMb": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The machine's swap in all, in megabytes; null where the server does not manage swap (it does on Linux).",
            "format": "int32"
          },
          "logicalCoreCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The machine's logical cores; null until the server first connects.",
            "format": "int32"
          },
          "configureTime": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the server last took its settings from the MANAGER; null until it first connects.",
            "format": "date-time"
          },
          "createdTime": {
            "type": "string",
            "description": "When the server was added.",
            "format": "date-time"
          },
          "autoConfigure": {
            "type": "boolean",
            "description": "Whether the MANAGER sets the server's access points by itself, from the addresses the server finds, and follows\nthem when they change."
          },
          "isEnabled": {
            "type": "boolean",
            "description": "Whether the server takes new sessions: a disabled one gets none, and apps that reach it are sent to another\nserver of the farm."
          },
          "description": {
            "type": [
              "null",
              "string"
            ],
            "description": "A note on the server; nothing in the API sets it, so it is null."
          },
          "lastConfigError": {
            "type": [
              "null",
              "string"
            ],
            "description": "Why the server could not use its last settings: the error it reported, as JSON; null when it could."
          },
          "serverState": {
            "description": "The server's state.",
            "$ref": "#/components/schemas/ServerState"
          },
          "serverStatus": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ServerStatusEx"
              }
            ],
            "description": "The server's last status report; null while it is `NotInstalled` or `Lost`."
          },
          "accessPoints": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccessPoint"
            },
            "description": "The server's addresses: those it listens on, and those that go to apps."
          },
          "allowInAutoLocation": {
            "type": "boolean",
            "description": "Whether apps that leave their location on Auto may be sent to the server; when off, only apps that choose its\nlocation reach it."
          },
          "hostPanelUrl": {
            "type": [
              "null",
              "string"
            ],
            "description": "The address of the server's control panel at its hosting provider, for you to open; null for none.",
            "format": "uri"
          },
          "power": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The server's weight against the farm's other servers, such as 1, 2, 4 or 16: a new session goes to the server\nwith the fewest sessions per power, and a server profile's session limits count per power. Null for its logical\ncores.",
            "format": "int32"
          },
          "publicIpV4": {
            "type": [
              "null",
              "string"
            ],
            "description": "The public IPv4 address the server found for itself when it last took its settings; null for none."
          },
          "publicIpV6": {
            "type": [
              "null",
              "string"
            ],
            "description": "The public IPv6 address the server found for itself when it last took its settings; null for none."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The server's tags, each a `#` and letters, digits, `_` or `:`, which apps see with its location.\n`#premium` keeps the server for premium sessions, such as trials; `#unblockable` marks one meant to\nwork where VPNs are blocked, which the MANAGER chooses for new sessions only after the others."
          },
          "clientFilterId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The id of the server's client filter, which decides which clients it serves; null for all clients."
          },
          "clientFilterName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The name of that client filter; null when the server has none."
          },
          "configSwapMemorySizeMb": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "The swap the server is set to have in all, in megabytes, where it manages swap (Linux): its own swap file makes\nup what the machine's other swap lacks. Null for its server profile's setting.",
            "format": "int32"
          }
        },
        "description": "A server: a machine that runs VpnHood! SERVER for one server farm, with its settings and state."
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "Paste your JWT token here. Do not include the 'Bearer' prefix.",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "tags": [
    {
      "name": "Projects",
      "description": "A project holds everything else: its server farms and servers, its access keys and its team. Every other path\nstarts with the project's id.",
      "x-displayName": "Projects"
    },
    {
      "name": "ServerFarms",
      "description": "A server farm is a group of servers that share access keys: a key works on every server of its farm. The farm also\nholds the certificate its keys carry and the server profile its servers run with.",
      "x-displayName": "Server farms"
    },
    {
      "name": "Servers",
      "description": "A server is a machine that runs VpnHood! SERVER for one of the project's server farms. Add it here, install VpnHood!\nSERVER on it over SSH or with its install command, and follow its state.",
      "x-displayName": "Servers"
    },
    {
      "name": "ServerProfiles",
      "description": "A server profile holds the settings of servers. Each server farm uses one, and the MANAGER sends its settings to\nevery server of the farm, so they change in one place.",
      "x-displayName": "Server profiles"
    },
    {
      "name": "Certificates",
      "description": "The SSL/TLS certificates of a server farm: its servers present them at the start of every connection, and its\naccess keys carry the domain of one. The MANAGER makes them, takes yours, or has Let's Encrypt sign one and renews\nit.",
      "x-displayName": "Certificates"
    },
    {
      "name": "FarmTokenRepos",
      "description": "A server farm's update URLs, which the panel calls Farm Token URLs: files on the web where the MANAGER publishes the\nfarm's connection details, encrypted, so that apps that can't connect fetch them and find the farm's servers again.",
      "x-displayName": "Update URLs"
    },
    {
      "name": "AccessTokens",
      "description": "Access keys are what users paste into the app to connect: each reaches the servers of one server farm and takes its\nlimits from an access key profile.",
      "x-displayName": "Access keys"
    },
    {
      "name": "AccessTokenProfiles",
      "description": "Access key profiles set what the access keys made from them allow: traffic, speed, devices, lifetime, ads, and the\nplans offered in each country. A change reaches every key of the profile.",
      "x-displayName": "Access key profiles"
    },
    {
      "name": "AccessTokenGroups",
      "description": "Access key groups put access keys in named sets, to list, export and delete them together. A group changes nothing\nin what its keys allow.",
      "x-displayName": "Access key groups"
    },
    {
      "name": "Accesses",
      "description": "VPN users are the uses of access keys, each with its traffic: a public key has one for each device that connects\nwith it, and a private key one that all its devices share.",
      "x-displayName": "VPN users"
    },
    {
      "name": "Devices",
      "description": "Devices that have connected with the project's access keys, each known by the client id its app made for it. A\nlocked device can't connect.",
      "x-displayName": "Devices"
    },
    {
      "name": "Report",
      "description": "The project's usage over a period: its traffic, its devices and their countries, and its servers' load.\n\nA period that ends now may be answered with figures up to a thirtieth of its length old, a day at most. While the\nreport can't be read, a call fails with 503: try again later.",
      "x-displayName": "Reports"
    },
    {
      "name": "ClientFilters",
      "description": "A client filter is a rule over a client's tags, and a server that has one serves only the clients it matches. Give\nit to a server with the server's `clientFilterId`.",
      "x-displayName": "Client filters"
    },
    {
      "name": "IpLocks",
      "description": "Locked IPs: a device that connects from a locked IP address is refused, whichever of the project's access keys it\nuses. An IP may also be listed without a lock, to keep a note on it.",
      "x-displayName": "Locked IPs"
    },
    {
      "name": "HostOrders",
      "description": "Host IPs are the IP addresses of the project's servers at their hosting provider, and host orders buy new ones.\nThey need a hosting provider set up for the project, which this API does not do: the project's\n`hastHostProvider` tells whether it has one.",
      "x-displayName": "Host orders"
    },
    {
      "name": "Team",
      "description": "A project's team: the people and the bots who work on it, each with one role. Its `resourceId` is the project's\nid. A bot is a member for a script, with an API key in place of a sign-in.",
      "x-displayName": "Team"
    },
    {
      "name": "PasswordAuthentication",
      "description": "The panel's accounts with an email and a password: create one, verify its email, reset its password, and sign in\nwith it. A script signs in with a bot's API key instead.\n\nA refused call is a `PasswordAuthenticationException`, whose `Data.PasswordAuthenticationError` names the\nreason: `InvalidCredential`, `EmailInUse`, `WeakPassword`, `InvalidEmail`,\n`MissingPassword`, `UserDisabled`, `InvalidLink` or `TooManyRequests`. Calls are limited for\neach IP address, for each email address and in all; over a limit, a call gets 429.",
      "x-displayName": "Password sign-in"
    },
    {
      "name": "System",
      "description": "The service's own upkeep, to run by hand.",
      "x-displayName": "System"
    },
    {
      "name": "Health",
      "description": "A check that the service answers, for its own monitoring.",
      "x-displayName": "Health"
    },
    {
      "name": "Authentication"
    }
  ]
}
