# Port

## Get a list of ports.

<mark style="color:blue;">`GET`</mark> `https://api.halosecurity.com/api/v1/port/list.json`

Returns a paginated list of ports.

[https://app.halosecurity.com/user/security/firewall/ports/](https://app.halosecurity.com/user/security/firewall/ports/?)

#### Query Parameters

| Name     | Type    | Description        |
| -------- | ------- | ------------------ |
| state    | String  | Filter by state    |
| service  | String  | Filter by service  |
| protocol | String  | Filter by protocol |
| port     | Integer | Filter by port     |
| risk     | Integer | Filter by risk     |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "list": [
        {
            "port": {
                "state_reason": "conn-refused",
                "target_name": "",
                "monitor_state": 1,
                "target_id": 1,
                "target": "www.example.com",
                "protocol": "tcp",
                "port": 22,
                "service": "ssh",
                "scope": 0,
                "service_method": "table",
                "risk": "none",
                "scan_id": "id1",
                "state": "closed",
                "risk_reason": "Closed",
                "key": "f44b7be5081eafde96b5c522970830c1",
                "service_confidence": 3
            },
            "target": {
                "target_name": "",
                "target_id": 1,
                "target": "www.example.com"
            }
        }
    ]
}
```

{% endtab %}
{% endtabs %}
