Networking API
The networking backend exposes a JSON HTTP API consumed by the UI extension via ArgoCD’s proxy at /extensions/networking/.
Authorization
Every data endpoint requires the Argocd-Application-Name header (namespace:name format, set automatically by ArgoCD’s proxy). The backend returns 403 if the header is missing or if the requested namespace is not managed by that Application (its destination namespace plus namespaces in status.resources). The backend needs get on applications.argoproj.io for this lookup; the Helm chart grants it by default.
Endpoints
Policies with ownership
POST /api/v1/policies-with-ownership Returns all Cilium network policies affecting a namespace (namespace-scoped and clusterwide), each tagged with ownership: app if the policy belongs to the calling Application’s resource tree, platform otherwise.
Clusterwide policies are filtered to those that can select pods in the namespace. A policy whose endpointSelector has no namespace term (a platform default deny, allow DNS) is returned. One pinned to other namespaces through io.kubernetes.pod.namespace (in matchLabels, or In/NotIn in matchExpressions) is not, and neither is a host policy with only a nodeSelector. Selectors on namespace labels can’t be checked without the Namespace object and are returned. Clusterwide policies in the Application’s own resource tree are always returned.
Request body:
{
"namespace": "default",
"resources": [
{ "group": "cilium.io", "kind": "CiliumNetworkPolicy", "namespace": "default", "name": "allow-guestbook-ingress" }
]
} | Field | Type | Required | Description |
|---|---|---|---|
namespace | string | Yes | Kubernetes namespace to list policies for |
resources | array | No | The Application’s resource tree refs (group, kind, namespace, name), used to tag ownership |
Response:
[
{
"name": "allow-guestbook-ingress",
"namespace": "default",
"description": "Allow ingress to guestbook",
"endpointSelector": { "app": "guestbook-ui" },
"hasIngress": true,
"hasEgress": false,
"ingressRuleCount": 2,
"egressRuleCount": 0,
"ingressRules": [
{ "peers": ["app=frontend"], "ports": ["TCP:80"] }
],
"creationTimestamp": "2026-03-15T10:30:00Z",
"ownership": "app",
"scope": "namespace"
},
{
"name": "platform-default-deny",
"hasIngress": false,
"hasEgress": true,
"ingressRuleCount": 0,
"egressRuleCount": 1,
"egressRules": [
{ "peers": ["kube-dns"], "ports": ["UDP:53"] }
],
"creationTimestamp": "2026-03-10T08:00:00Z",
"ownership": "platform",
"scope": "clusterwide"
}
] scope is namespace (CiliumNetworkPolicy) or clusterwide (CiliumClusterwideNetworkPolicy). Rule peers cover endpoint selectors, CIDRs, entities, and FQDNs; "any" means unrestricted.
List endpoints
GET /api/v1/endpoints?namespace={ns}&pods={pods} Returns CiliumEndpoints for a namespace, including identity, IPs, and policy enforcement state.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
namespace | string | Yes | Kubernetes namespace |
pods | string | No | Comma-separated pod names to filter (app-scoped mode) |
Response:
[
{
"name": "guestbook-ui-abc123",
"namespace": "default",
"endpointId": 1234,
"identityId": 56789,
"ipv4": "10.0.1.5",
"ingressEnforcement": "true",
"egressEnforcement": "false",
"state": "ready",
"labels": { "k8s:app": "guestbook-ui" },
"namedPorts": [
{ "name": "http", "port": 80, "protocol": "TCP" }
]
}
] Query flows
GET /api/v1/flows?namespace={ns}&since={duration}&limit={n}&verdict={verdict}&direction={direction}&pods={pods} Returns recent Hubble flows for a namespace from the backend’s flow buffer.
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
namespace | string | Yes | - | Kubernetes namespace |
since | string | No | 5m | Time window as Go duration (5m, 1h) |
limit | integer | No | 100 | Max flows (capped at 1000) |
verdict | string | No | - | Filter: FORWARDED, DROPPED, ERROR |
direction | string | No | - | Filter by flow direction |
pods | string | No | - | Comma-separated pod names; keeps flows where source or destination matches. Applied before limit. |
summary counts every flow in the window that matches the filters, before limit truncates flows.
Response:
{
"flows": [
{
"time": "2026-03-15T10:30:00Z",
"verdict": "FORWARDED",
"direction": "EGRESS",
"sourceNamespace": "default",
"sourcePod": "guestbook-ui-abc123",
"sourceIP": "10.0.1.5",
"sourceWorkload": "guestbook-ui",
"destNamespace": "default",
"destPod": "redis-master-def456",
"destIP": "10.0.1.10",
"destWorkload": "redis-master",
"protocol": "TCP",
"destPort": 6379,
"summary": "TCP Flags: SYN",
"isReply": false,
"allowedBy": ["default/allow-redis"]
}
],
"hubble": true,
"summary": { "total": 42, "forwarded": 40, "dropped": 2, "error": 0 }
} Fields that Hubble did not resolve are omitted:
| Field | Description |
|---|---|
time | RFC 3339 in UTC with a fixed nine-digit fraction, so string order equals time order |
sourceWorkload, destWorkload | Owning workload of the pod (e.g. the Deployment name) |
sourceIdentity, destIdentity | Cilium reserved identity for non-pod peers: world (or world-ipv4 / world-ipv6), host, kube-apiserver, remote-node, … |
destDNS | First DNS name Hubble saw for the destination IP |
allowedBy, deniedBy | Policies Cilium reports as having allowed or denied the flow, as namespace/name (or name for clusterwide policies). Empty for drops caused only by default deny. |
If Hubble Relay is not configured, the response is { "flows": [], "hubble": false, "message": "Hubble Relay is not configured" }.
Error responses
{
"error": "namespace is required"
} | Status | Description |
|---|---|
| 400 | Missing or invalid parameter, or invalid request body |
| 403 | Namespace authorization failed (missing header or namespace not managed by the Application) |
| 500 | Kubernetes API or Hubble query failed |