# Proxies

## List stored proxies

`GET /proxies`

```json
{
  "tags": [
    "Proxies"
  ],
  "summary": "List stored proxies",
  "description": "Proxies saved in the launcher store. **Credentials (username/password) are never returned.**",
  "responses": {
    "200": {
      "description": "Proxy summaries.",
      "content": {
        "application/json": {
          "schema": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProxySummary"
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    }
  }
}
```

## Add a proxy

`POST /proxies`

```json
{
  "tags": [
    "Proxies"
  ],
  "summary": "Add a proxy",
  "description": "Adds a proxy to the store (deduped by endpoint). Pass `proxy` as a string, or explicit `host`/`port` (+ `kind`/`username`/`password`).",
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/AddProxyRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Stored proxy summary.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ProxySummary"
          }
        }
      }
    },
    "400": {
      "description": "Unparseable proxy / missing host+port.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    }
  }
}
```

## Delete a proxy

`DELETE /proxies/{id}`

```json
{
  "tags": [
    "Proxies"
  ],
  "summary": "Delete a proxy",
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Deleted.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "deleted": {
                "type": "boolean",
                "example": true
              },
              "id": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    }
  }
}
```
