# List DDoS filtering presets

`GET https://console.advinservers.com/api/v1/client/servers/{server}/ddos-protection/presets`

### Overview

Lists the filtering presets any protected address can use. Pass a preset's `id` when creating a rule. Use the address-specific endpoint to list every preset one address supports. Retrieval failures return an empty list.

### Permissions

Requires the `network.read` (View networking) permission for the selected team. Resources outside that team return 404.

## Authorization

Send `Authorization: Bearer <token>` with the request. Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.

## Path parameters

- `server` (string, required): The server uuid short

## Response 200

The whole set, as a JSON array. There is no envelope and no paging.

- `id` (string, required): The id ID.
- `name` (string, required): The name shown to customers.
- `protocol` (string, required): The value of `protocol`.
- `description` (string | null, required): An optional description shown to customers.
- `action` (string, required): What the preset does with matching traffic, FILTER or DROP.
- `filter` (object | null, required): The value of `filter`.
  - `filterId` (integer | null, required): The filter id ID.
  - `name` (string, required): The name shown to customers.
  - `id` (integer | null, required): The id ID.

```json
[
  {
    "id": "19cfb2ea-daa8-4693-ad63-9d147b00b8f7",
    "name": "HTTPS",
    "protocol": "TCP",
    "description": "Web traffic on port 443, with TLS handshakes validated before they reach the server.",
    "action": "FILTER",
    "filter": {
      "filterId": 7,
      "name": "https",
      "id": 31
    }
  }
]
```

## Errors

- `401`: The key was missing, malformed, revoked, or belongs to an account that no longer exists.
- `403`: Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
- `404`: The resource was not found in the selected team. Resources in another account or team also return 404.
- `429`: Too many requests. The `Retry-After` header says how many seconds to wait. Limits are per account, so several keys on one account share them.

## Example request

```bash
curl --request GET \
  --url 'https://console.advinservers.com/api/v1/client/servers/{server}/ddos-protection/presets' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
```
