---
title: "List all subnets"
method: GET
path: "/api/v1/subnets"
tags: ["Subnets"]
---

# List all subnets

`GET /api/v1/subnets`

Returns all subnets accessible to the authenticated user or daemon.
Daemons can only access subnets within their assigned network.
Supports pagination via `limit` and `offset` query parameters,
and ordering via `group_by`, `order_by`, and `order_direction`.

## Query parameters

- `network_id` string, uuid, nullable
- `group_by` 'created_at' | 'name' | 'cidr' | 'subnet_type' | 'updated_at' | 'network_id' | 'last_seen_at' — Fields that subnets can be ordered/grouped by.
- `order_by` 'created_at' | 'name' | 'cidr' | 'subnet_type' | 'updated_at' | 'network_id' | 'last_seen_at' — Fields that subnets can be ordered/grouped by.
- `order_direction` 'asc' | 'desc' — Direction for ORDER BY clauses.
- `limit` integer, nullable
- `offset` integer, nullable
- `at` string, date-time, nullable
- `stale` boolean, nullable

## Response `200`

List of subnets

- PaginatedApiResponseSubnet — Response type for paginated list endpoints (pagination is always present in meta)
  - `data` object[], required
    - `cidr` string, required
    - `description` string, nullable
    - `name` string, required
    - `network_id` string, uuid, required
    - `source` union, required
      - object
        - `type` 'Manual', required
      - object
        - `type` 'System', required
      - object
        - `type` 'Discovery', required
      - object
        - `details` MatchDetails, required
          - `confidence` 'NotApplicable' | 'Low' | 'Medium' | 'High' | 'Certain', required
          - `reason` union, required — Match reason - either a simple reason string or a container with nested reasons
            - object
              - …
            - object
              - …
        - `type` 'DiscoveryWithMatch', required
      - object
        - `type` 'Unknown', required
    - `subnet_type` 'Internet' | 'Remote' | 'Gateway' | 'VpnTunnel' | 'Dmz' | 'Lan' | 'WiFi' | 'IoT' | 'Guest' | 'DockerBridge' | 'PodmanBridge' | 'MacVlan' | 'IpVlan' | 'Management' | 'Storage' | 'Loopback' | 'Unknown', required
    - `tags` string[], required
    - `virtualization` union — Virtualization metadata for subnets that belong to a virtual infrastructure. Consistent with HostVirtualization and ServiceVirtualization patterns. Points to the service that provides the virtualization (e.g., Docker daemon).
      - object — Docker bridge network — host-scoped, same CIDR on different hosts are distinct subnets.
        - `service_id` string, uuid, required — The Docker daemon service that owns this bridge network. Different Docker daemons on different hosts = distinct bridge subnets.
        - `type` 'Docker', required
      - object — Podman bridge network — host-scoped like Docker; same CIDR on different daemons are distinct subnets.
        - `service_id` string, uuid, required — The Podman daemon service that owns this bridge network. Different Podman daemons on different hosts = distinct bridge subnets.
        - `type` 'Podman', 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` — 2 info
  - added the optional property `meta/pagination/group_counts` to the response with the `200` status
  - removed the `ScanTarget` enum value from the `data/items/allOf[#/components/schemas/SubnetBase]/subnet_type` response property for the response status `200`
- **2026-07-28** `1be6783504b4` — 1 warning
  - added the new `ScanTarget` enum value to the `data/items/allOf[#/components/schemas/SubnetBase]/subnet_type` response property for the response status `200`
- **2026-07-22** `8d79aa9841a2` — 3 info
  - added the new optional `query` request parameter `stale`
  - added the enum value `last_seen_at` to the property `oneOf[#/components/schemas/SubnetOrderField]/` of the `query` request parameter `group_by`
  - added the enum value `last_seen_at` to the property `oneOf[#/components/schemas/SubnetOrderField]/` of the `query` request parameter `order_by`
- **2026-06-26** `027b5ba88c2b` — 1 breaking, 1 warning
  - added `subschema #2: Podman` to the `data/items/allOf[#/components/schemas/SubnetBase]/virtualization/oneOf[#/components/schemas/SubnetVirtualization]/` response property `oneOf` list for the response status `200`
  - added the new `PodmanBridge` enum value to the `data/items/allOf[#/components/schemas/SubnetBase]/subnet_type` response property for the response status `200`
- **2026-06-11** `aac398d6764d` — 1 info
  - added the new optional `query` request parameter `at`

[Full history](https://skmtc.dev/scanopy/apis/scanopy-api/changes/api/v1/subnets/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)
