---
title: "List NetworkPolicies."
method: GET
path: "/v1/network-policies"
tags: ["network-policies"]
---

# List NetworkPolicies.

`GET /v1/network-policies`

List all NetworkPolicies for the authenticated account.

## Query parameters

- `name` string
- `id` string
- `search` string
- `limit` integer
- `starting_after` string
- `include_total_count` boolean

## Response `200`

Successfully retrieved list of NetworkPolicies.

- NetworkPolicyListView — A list of NetworkPolicies with pagination information.
  - `network_policies` NetworkPolicyView[], required — The list of NetworkPolicies.
    - `id` string, required — The unique identifier of the NetworkPolicy.
    - `name` string, required — The human-readable name of the NetworkPolicy. Unique per account.
    - `description` string, nullable — Optional description of the NetworkPolicy.
    - `egress` EgressRulesView, required — Egress (outbound) network rules for a NetworkPolicy.
      - `allow_all` boolean, required — If true, all egress traffic is allowed and other fields are ignored. Used for ALLOW_ALL policies.
      - `allow_devbox_to_devbox` boolean, required — If true, allows traffic between the account's own devboxes via tunnels.
      - `allowed_hostnames` string[], required — DNS-based allow list with wildcard support. Examples: ['github.com', '*.npmjs.org', 'api.openai.com']. Empty list with allow_all=false means no network access (DENY_ALL behavior).
      - `allowed_cidrs` AllowedCidr[], required — CIDR-based allow list with optional port restrictions, additive with allowed_hostnames.
        - `cidr` string, required — IPv4 CIDR block in canonical form (host bits zero), e.g. '10.12.0.0/16'.
        - `ports` PortRule[], nullable — (Optional) Ports allowed for this CIDR. Empty or omitted means all ports and protocols.
          - `port` integer, required — The allowed port (1-65535), or the start of a port range.
          - `end_port` integer, nullable — (Optional) Inclusive end of the port range (port-65535). Omit for a single port.
          - `protocol` 'TCP' | 'UDP' — L4 protocol for a port rule.
      - `allow_agent_gateway` boolean, required — If true, allows devbox egress to the agent gateway for credential proxying.
      - `allow_mcp_gateway` boolean, required — If true, allows devbox egress to the MCP hub for MCP server access.
      - `allow_runloop_mirrors` boolean, required — If true, allows devbox egress to Runloop's package/image registry mirrors. Implicitly allowed when allow_all is true.
    - `create_time_ms` integer, required — The creation time of the NetworkPolicy (Unix timestamp in milliseconds).
    - `update_time_ms` integer, required — Last update time of the NetworkPolicy (Unix timestamp in milliseconds).
  - `has_more` boolean, required — Whether there are more results available.
  - `total_count` integer, nullable — Total count of items in this response.

## Other responses

- `401` — Unauthorized. Invalid or missing authentication.
- `403` — Forbidden. Account does not have devbox capability.
- `500` — Internal server error.

## Changes

- **2026-07-22** `fe489479c0aa` — 3 info
  - added the new optional `query` request parameter `search`
  - added the required property `network_policies/items/egress/allow_runloop_mirrors` to the response with the `200` status
  - added the required property `network_policies/items/egress/allowed_cidrs` to the response with the `200` status
- **2026-03-24** `32e4b2dfb757` — 1 info
  - added the new optional `query` request parameter `include_total_count`
- **2026-02-26** `439b1a08248e` — 1 breaking, 1 info
  - removed the required property `network_policies/items/egress/allow_ai_gateway` from the response with the `200` status
  - added the required property `network_policies/items/egress/allow_agent_gateway` to the response with the `200` status
- **2026-02-25** `dd0f43e15cb6` — 2 info
  - added the required property `network_policies/items/egress/allow_ai_gateway` to the response with the `200` status
  - added the required property `network_policies/items/egress/allow_mcp_gateway` to the response with the `200` status
- **2026-02-19** `8704a652545c` — 2 breaking
  - the response property `total_count` became nullable for the status `200`
  - the response property `total_count` became optional for the status `200`

[Full history](https://skmtc.dev/runloopai/apis/runloop-api/changes/v1/network-policies/get.md)

---

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