The backend exposes 37 JSON endpoints under /api/v1. All of them are
generated from Go handlers via the in-tree apigen tool - the canonical
spec is internal/server/openapi.gen.json and the typed TS client is
frontend/src/shared/api/api.gen.ts. Hand-edit nothing.
How routes get registered
Each handler in internal/server/handlers.go carries a comment marker:
//api:route POST /api/v1/simulation/run
//api:header Remote-User={user}
func ( s * Server) RunSimulation ( user string , simCtx simulator.SimContext) ( * simulator.DecisionResult, error ) { ... }
go run ./apigen parses these markers and generates:
internal/server/routes.gen.go - Gin route registration
internal/server/openapi.gen.json - OpenAPI 3.1 document
frontend/src/shared/api/models.gen.ts - TS types for every Go type used
frontend/src/shared/api/api.gen.ts - typed fetch wrappers
Header-source params (Remote-User etc.) are stripped from the TS client - the
proxy sets them. See auth for the trust model.
Routes
Index and search
Method Path Returns GET /api/v1/indexThe full in-memory index snapshot GET /api/v1/search?q=...SearchResult[] across every resource typeGET /api/v1/segment/{segmentID}/policiesPolicyCoverage[] for one segmentGET /api/v1/reachability?q=hostnameReachabilityResult (segments + policies covering the hostname)
Reports (legacy quick views)
Method Path Returns GET /api/v1/reports/orphansOrphanReport[] (segments without policy coverage)GET /api/v1/reports/overlapsOverlapReport[] (domains in multiple segments)
Simulator
Method Path Returns POST /api/v1/simulation/runRuns the FSM, persists if successful, returns DecisionResult GET /api/v1/simulationSimulationRun[] paginated listGET /api/v1/simulation/{id}One historical run DELETE /api/v1/simulation/{id}Removes one run GET /api/v1/simulation/countTotal run count
Method Path Returns GET /api/v1/meIdentity from Remote-* headers (post-strip)GET /api/v1/aboutBuild version, commit, date POST /api/v1/telemetryBrowser telemetry batch (page views + errors) GET /metricsPrometheus metrics (in-cluster only)
Flow graph
Method Path Returns POST /api/v1/graphFlowGraph filtered by the body’s selectionGET /api/v1/routesFull RouteMatrix (every reachable user-group to segment path)
Analytics
Method Path Returns GET /api/v1/analytics/blast-radius?id=...&type=...BlastRadiusReportGET /api/v1/analytics/policy-shadowsPolicyShadowReport[]GET /api/v1/analytics/orphan-clustersOrphanCluster[] (orphans grouped by segment group)GET /api/v1/analytics/domain-overlapsDomainOverlapDetail[]GET /api/v1/analytics/connector-loadConnectorLoadEntry[]GET /api/v1/analytics/scim-reachScimReachEntry[]
Raw ZPA passthrough
For the few cases where you want the raw resource list as the SDK returns it.
Useful for debugging or building custom tooling on top.
Method Path GET /api/v1/zpa/segmentsGET /api/v1/zpa/segment-groupsGET /api/v1/zpa/access-policiesGET /api/v1/zpa/app-connectorsGET /api/v1/zpa/app-connector-groupsGET /api/v1/zpa/server-groupsGET /api/v1/zpa/scim-groupsGET /api/v1/zpa/scim-attribute-headersGET /api/v1/zpa/scim-attribute-values?idp_id=...&header_id=...GET /api/v1/zpa/idp-controllersGET /api/v1/zpa/trusted-networksGET /api/v1/zpa/posture-profilesGET /api/v1/zpa/certificatesGET /api/v1/zpa/client-typesGET /api/v1/zpa/platforms
OpenAPI
The full spec lives at internal/server/openapi.gen.json. Drop it into
Swagger UI, Insomnia, or your favorite client generator. It is regenerated
on every go run ./apigen and committed.
Header Set by Used by X-Request-IdServer middleware (UUID per request, also echoed back) Every log line + every response Remote-User, Remote-Email, Remote-Groups, Remote-NameForward-auth proxy (Authelia via Caddy) RunSimulation, GetMe, access log user field
Untrusted peers get the Remote-* headers stripped in middleware before any
handler runs.