# Asset Open Port List

GET /easm/assets/{asset_id}/open-ports: Lists the ports found on an asset, with the state and protocol of each.

Source: https://docs.deepinfo.com/reference/easm/asset-open-port-list/

Last updated: 2026-09-27

---
`GET https://api.deepinfo.com/v1/easm/assets/{asset_id}/open-ports`

Lists the ports found on an asset, with the `state` and `protocol` of each. Filter and sort with the optional query parameters.

## Authentication

Send your API key in the `apikey` request header.

## Path Parameters

| Parameter | Required | Description | Example |
|---|---|---|---|
| `asset_id` | Required |  | `000000000000000ea4f90001` |

## Query Parameters

| Parameter | Required | Description | Example |
|---|---|---|---|
| `state__in` | Optional |  | `open` |
| `protocol__in` | Optional |  | `tcp` |
| `ordering` | Optional |  | `port` |
| `page` | Optional | Min `1`, max `800`. Default `1`. | `1` |
| `page_size` | Optional | Min `25`, max `100`. Default `100`. | `25` |
| `port__in` | Optional |  |  |
| `port__nin` | Optional |  |  |
| `state__nin` | Optional |  |  |
| `protocol__nin` | Optional |  |  |

## Response Fields

| Field | Type | Description |
|---|---|---|
| `page` | integer |  |
| `page_size` | integer |  |
| `result_count` | integer |  |
| `results` | array of object |  |
| `results[].port` | integer |  |
| `results[].state` | string | One of `open`, `closed`, `filtered`, `unfiltered`, `open\|filtered`, `closed\|filtered` |
| `results[].protocol` | string |  |

Paginated. See [Getting Started → Pagination](/getting-started/pagination/).

## Response Schema

_Inferred from examples._ Built from the saved 2xx example response: the fields it contains, with the types seen there. It is not a contract.

| Field | Type |
|---|---|
| `page` | number |
| `page_size` | number |
| `result_count` | number |
| `results` | array<object> |
| `results[].port` | number |
| `results[].state` | string |
| `results[].protocol` | string |

## Examples

### 200 · OK

```bash
curl 'https://api.deepinfo.com/v1/easm/assets/000000000000000ea4f90001/open-ports?state__in=open&protocol__in=tcp&ordering=port' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Accept: application/json'
```

`Content-Type: application/json` · `deepinfo-request-id: 00000000-0000-4000-8000-0000356d0001`

```json
{
  "page": 1,
  "page_size": 25,
  "result_count": 21,
  "results": [
    {
      "port": 443,
      "state": "open",
      "protocol": "tcp"
    },
    {
      "port": 80,
      "state": "open",
      "protocol": "tcp"
    }
  ]
}
```

### 400 · Invalid Parameter (invalid page=0)

```bash
curl 'https://api.deepinfo.com/v1/easm/assets/000000000000000ea4f90001/open-ports?page=0' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Accept: application/json'
```

`Content-Type: application/json` · `deepinfo-request-id: 00000000-0000-4000-8000-0000356d0001`

```json
{
  "code": 10400,
  "parameters": [
    {
      "param": "page",
      "details": [
        "Ensure this value is greater than or equal to 1."
      ]
    }
  ],
  "solution": "https://docs.deepinfo.com/reference/"
}
```

### 404 · Not Found (nonexistent asset_id)

```bash
curl 'https://api.deepinfo.com/v1/easm/assets/ffffffffffffffffffffffff/open-ports' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Accept: application/json'
```

`Content-Type: application/json` · `deepinfo-request-id: 00000000-0000-4000-8000-0000356d0001`

```json
{
  "code": 30003,
  "details": [
    "Asset with ffffffffffffffffffffffff does not exist."
  ],
  "solution": "https://docs.deepinfo.com/reference/"
}
```
