# List open ports

`GET /app/ports`

Open-port issues grouped by port, with the assets each port is open on.

Scope: `issues:read`.

## Example

```bash
curl -X GET "https://api.fortwatch.ai/app/ports" \
  -H "Authorization: Bearer $FORTWATCH_API_KEY"
```

## Response 200

The request succeeded.

- `ports` (object[], required)
  - `port` (number, required)
  - `protocol` (string, required)
  - `service` (object | null, required)
  - `severity` (string, required)
  - `category` (string, required)
  - `issueCategory` (string, required)
  - `label` (string, required)
  - `issues` (number, required)
  - `assets` (object[], required)
    - `id` (number, required)
    - `name` (object | null, required)
    - `value` (string, required)
    - `type` (string, required)
    - `projectName` (string)
    - `projectColor` (object | null)
    - `issueId` (number, required)
    - `seenInLatestScan` (boolean, required)
- `categories` (object[], required)
  - `category` (string, required)
  - `label` (string, required)
  - `issueCategory` (string, required)
  - `total` (number, required)
  - `issues` (number, required)
  - `critical` (number, required)
  - `high` (number, required)
  - `medium` (number, required)
- `summary` (object, required)
  - `total` (number, required)
  - `critical` (number, required)
  - `high` (number, required)
  - `medium` (number, required)
  - `low` (number, required)
  - `byCategory` (object, required)

```json
{
  "ports": [
    {
      "port": 1,
      "protocol": "string",
      "service": {},
      "severity": "string",
      "category": "string",
      "issueCategory": "string",
      "label": "string",
      "issues": 1,
      "assets": [
        {}
      ]
    }
  ],
  "categories": [
    {
      "category": "string",
      "label": "string",
      "issueCategory": "string",
      "total": 1,
      "issues": 1,
      "critical": 1,
      "high": 1,
      "medium": 1
    }
  ],
  "summary": {
    "total": 1,
    "critical": 1,
    "high": 1,
    "medium": 1,
    "low": 1,
    "byCategory": {}
  }
}
```

## Errors

- 400: The request is not valid: a field is missing or has the wrong shape (the message names it).
- 401: No valid credentials: the API key or access token is missing, revoked or expired (INVALID_API_KEY, INVALID_TOKEN).
- 403: Not allowed: the key or token lacks this scope (SCOPE_REQUIRED), the route is dashboard-only (SESSION_REQUIRED), or a plan limit applies.
- 429: Too many requests (RATE_LIMITED): wait the seconds Retry-After gives.
