# Proxies

## Список збережених проксі

`GET /proxies`

```json
{
  "tags": [
    "Proxies"
  ],
  "summary": "Список збережених проксі",
  "description": "Проксі, збережені у сховищі лаунчера. **Облікові дані (логін/пароль) не повертаються.**",
  "responses": {
    "200": {
      "description": "Коротка інформація про проксі.",
      "content": {
        "application/json": {
          "schema": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProxySummary"
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    }
  }
}
```

## Додати проксі

`POST /proxies`

```json
{
  "tags": [
    "Proxies"
  ],
  "summary": "Додати проксі",
  "description": "Додає проксі у сховище (з дедуплікацією за ендпоінтом). Передайте\nрядок `proxy` або явні поля `host`/`port` (+ `kind`/`username`/`password`).\n",
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/AddProxyRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Коротка інформація про збережений проксі.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ProxySummary"
          }
        }
      }
    },
    "400": {
      "description": "Нерозбірливий проксі / не вказані host та port.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    }
  }
}
```

## Видалити проксі

`DELETE /proxies/{id}`

```json
{
  "tags": [
    "Proxies"
  ],
  "summary": "Видалити проксі",
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Видалено.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "deleted": {
                "type": "boolean",
                "example": true
              },
              "id": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    }
  }
}
```
