---
title: "List all Ports"
method: GET
path: "/api/v1/ports"
tags: ["Ports"]
---

# List all Ports

`GET /api/v1/ports`

## Query parameters

- `host_id` string, uuid, nullable
- `network_id` string, uuid, nullable
- `ids` string[], nullable
- `limit` integer, nullable
- `offset` integer, nullable
- `at` string, date-time, nullable

## Response `200`

List of Ports

- object — Response type for paginated list endpoints (pagination is always present in meta)
  - `data` Port[], required
    - `number` integer, required
    - `protocol` 'Udp' | 'Tcp', required
    - `type` string — Auto-derived from number+protocol; optional on create
    - `host_id` string, uuid, required
    - `network_id` string, uuid, required
    - `created_at` string, date-time, required
    - `first_discovery_id` string, uuid, nullable
    - `id` string, uuid, required
    - `last_discovery_id` string, uuid, nullable
    - `last_seen_at` string, date-time
    - `lineage_id` string, uuid, nullable
    - `updated_at` string, date-time, required
    - `valid_from` string, date-time
    - `valid_to` string, date-time, nullable
  - `error` string, nullable
  - `meta` PaginatedApiMeta, required — API metadata for paginated list responses (pagination is always present)
    - `api_version` integer, required — API version (integer, increments on breaking changes)
    - `pagination` PaginationMeta, required — Pagination metadata returned with paginated responses.
      - `group_counts` GroupCount[], nullable — Size of every group, in the same order the rows are grouped, when the request specified a `group_by`. Lets a paginated client show a group's true size instead of the slice of it that happens to be on this page. Absent when the list isn't grouped.
        - `count` integer, required — How many rows fall in this group in total, not just on this page.
        - `value` string, nullable — The group's value, rendered as text. `null` for rows whose group key is NULL (the "ungrouped" bucket).
      - `has_more` boolean, required — Whether there are more items after this page
      - `limit` integer, required — Maximum items per page (as requested)
      - `offset` integer, required — Number of items skipped
      - `total_count` integer, required — Total number of items matching the filter (ignoring pagination)
    - `server_version` string, required — Server version (semver)
  - `success` boolean, required

## Changes

- **2026-07-29** `49ea97c8bb7e` — 1 info
  - added the optional property `meta/pagination/group_counts` to the response with the `200` status
- **2026-06-11** `aac398d6764d` — 1 info
  - added the new optional `query` request parameter `at`
- **2026-06-11** `c7bad4e3d772` — 1 warning
  - deleted the `query` request parameter `at`
- **2026-06-11** `5f1208d6d875` — 1 info
  - added the new optional `query` request parameter `at`
- **2026-05-03** `d38c20597ec1` — 6 info
  - added the optional property `data/items/allOf[subschema #2]/first_discovery_id` to the response with the `200` status
  - added the optional property `data/items/allOf[subschema #2]/last_discovery_id` to the response with the `200` status
  - added the optional property `data/items/allOf[subschema #2]/last_seen_at` to the response with the `200` status
  - added the optional property `data/items/allOf[subschema #2]/lineage_id` to the response with the `200` status
  - …2 more

[Full history](https://skmtc.dev/scanopy/apis/scanopy-api/changes/api/v1/ports/get.md)

---

[API](https://skmtc.dev/scanopy/apis/scanopy-api.md) · [All operations](https://skmtc.dev/scanopy/apis/scanopy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/scanopy/scanopy-api/revisions/49ea97c8bb7e/schema)
