{
  "opencollection": "1.0.0",
  "info": {
    "name": "Kubernetes Services Kubernetes EndpointSlices NetworkPolicy API",
    "version": "v1.32.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "NetworkPolicy",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Kubernetes Services List NetworkPolicies in a namespace",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://kubernetes.default.svc/apis/networking.k8s.io/v1/namespaces/:namespace/networkpolicies",
            "params": [
              {
                "name": "namespace",
                "value": "",
                "type": "path",
                "description": "Namespace name to scope the request."
              },
              {
                "name": "labelSelector",
                "value": "",
                "type": "query",
                "description": "Label selector to filter resources."
              },
              {
                "name": "fieldSelector",
                "value": "",
                "type": "query",
                "description": "Field selector to filter resources by field values."
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "Maximum number of items to return."
              },
              {
                "name": "continue",
                "value": "",
                "type": "query",
                "description": "Pagination continuation token."
              },
              {
                "name": "watch",
                "value": "",
                "type": "query",
                "description": "If true, stream watch events instead of returning a list."
              }
            ]
          },
          "docs": "Returns a list of all NetworkPolicy objects in the specified namespace. Network policies are enforced by the CNI plugin and define which pods can send or receive network traffic."
        },
        {
          "info": {
            "name": "Kubernetes Services Create a NetworkPolicy",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://kubernetes.default.svc/apis/networking.k8s.io/v1/namespaces/:namespace/networkpolicies",
            "params": [
              {
                "name": "namespace",
                "value": "",
                "type": "path",
                "description": "Namespace name to scope the request."
              },
              {
                "name": "dryRun",
                "value": "",
                "type": "query",
                "description": "If 'All', validates without persisting the change."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new NetworkPolicy in the specified namespace. Once created, the CNI plugin enforces the policy by allowing only the traffic explicitly permitted by ingress and egress rules."
        },
        {
          "info": {
            "name": "Kubernetes Services Get a NetworkPolicy",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://kubernetes.default.svc/apis/networking.k8s.io/v1/namespaces/:namespace/networkpolicies/:name",
            "params": [
              {
                "name": "namespace",
                "value": "",
                "type": "path",
                "description": "Namespace name to scope the request."
              },
              {
                "name": "name",
                "value": "",
                "type": "path",
                "description": "Name of the NetworkPolicy resource."
              }
            ]
          },
          "docs": "Returns the specified NetworkPolicy including its pod selector, ingress rules, egress rules, and policy types (Ingress, Egress, or both)."
        },
        {
          "info": {
            "name": "Kubernetes Services Replace a NetworkPolicy",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://kubernetes.default.svc/apis/networking.k8s.io/v1/namespaces/:namespace/networkpolicies/:name",
            "params": [
              {
                "name": "namespace",
                "value": "",
                "type": "path",
                "description": "Namespace name to scope the request."
              },
              {
                "name": "name",
                "value": "",
                "type": "path",
                "description": "Name of the NetworkPolicy resource."
              },
              {
                "name": "dryRun",
                "value": "",
                "type": "query",
                "description": "If 'All', validates without persisting the change."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Replaces the full specification of the specified NetworkPolicy. The CNI plugin re-evaluates the updated rules immediately for all pods selected by the policy."
        },
        {
          "info": {
            "name": "Kubernetes Services Patch a NetworkPolicy",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://kubernetes.default.svc/apis/networking.k8s.io/v1/namespaces/:namespace/networkpolicies/:name",
            "params": [
              {
                "name": "namespace",
                "value": "",
                "type": "path",
                "description": "Namespace name to scope the request."
              },
              {
                "name": "name",
                "value": "",
                "type": "path",
                "description": "Name of the NetworkPolicy resource."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Applies a partial update to the specified NetworkPolicy using strategic merge patch. Useful for adding or removing individual ingress or egress rules."
        },
        {
          "info": {
            "name": "Kubernetes Services Delete a NetworkPolicy",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://kubernetes.default.svc/apis/networking.k8s.io/v1/namespaces/:namespace/networkpolicies/:name",
            "params": [
              {
                "name": "namespace",
                "value": "",
                "type": "path",
                "description": "Namespace name to scope the request."
              },
              {
                "name": "name",
                "value": "",
                "type": "path",
                "description": "Name of the NetworkPolicy resource."
              }
            ]
          },
          "docs": "Deletes the specified NetworkPolicy. Traffic previously restricted by this policy will no longer be affected once the policy is removed."
        },
        {
          "info": {
            "name": "Kubernetes Services List NetworkPolicies across all namespaces",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://kubernetes.default.svc/apis/networking.k8s.io/v1/networkpolicies",
            "params": [
              {
                "name": "labelSelector",
                "value": "",
                "type": "query",
                "description": "Label selector to filter resources."
              },
              {
                "name": "fieldSelector",
                "value": "",
                "type": "query",
                "description": "Field selector to filter resources by field values."
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "Maximum number of items to return."
              },
              {
                "name": "watch",
                "value": "",
                "type": "query",
                "description": "If true, stream watch events instead of returning a list."
              }
            ]
          },
          "docs": "Returns all NetworkPolicy objects across every namespace in the cluster. Useful for auditing network segmentation, identifying gaps in policy coverage, and reviewing cross-namespace traffic restrictions."
        }
      ]
    }
  ],
  "bundled": true
}