Prompt
How do I find undocumented APIs in my environment?
Latest observation
Finding undocumented APIs in your own environment usually means inventorying what’s exposed, then mapping it back to services, docs, and code. If you mean something you’re authorized to assess, here’s a practical approach.
1) Start from the network edge
Look for anything that could expose HTTP/API traffic:
- Load balancers / reverse proxies
- API gateways
- Ingress controllers
- Web servers
- Service mesh telemetry
- DNS records for internal service names
Useful places to inspect:
- Reverse proxy configs
- Kubernetes Ingress and Services
- API gateway route tables
- Cloud load balancers
- Internal service catalogs
2) Enumerate endpoints from traffic and logs
A lot of “undocumented” APIs are just endpoints nobody wrote docs for.
Check:
- Access logs
- API gateway logs
- WAF logs
- APM traces
- Distributed tracing systems
- Client-side app network calls
- Mobile app traffic
- Frontend source maps / JS bundles
Look for:
- Repeated paths
- Unusual verbs:
PATCH,OPTIONS,TRACE - Hidden version paths:
/api/v2,/internal,/admin - GraphQL endpoints:
/graphql - gRPC endpoints or reflection-enabled services
3) Compare docs vs reality
Create a list of documented endpoints from:
- OpenAPI/Swagger specs
- Postman collections
- Internal wiki docs
- SDKs / client libraries
- Integration tests
Then compare to what you observe in logs and service definitions. Differences are often undocumented endpoints.
4) Inspect application code and configs
If you have source access, search for:
- Route decorators / handlers
- Controllers
- RPC service definitions
- Feature flags
- “internal” or “private” packages
- Test-only endpoints accidentally deployed
Examples of useful searches:
@app.routerouter.get(MapControllersgrpc.Servicegraphqlinternaladmindebug
5) Use schema and discovery mechanisms
Some systems self-describe:
- OpenAPI docs:
/openapi.json,/swagger.json - GraphQL introspection
- gRPC reflection
- Service discovery registries
- WSDL for SOAP services
If these are enabled, they can reveal methods that aren’t in human-written documentation.
6) Check for shadow APIs
Undocumented APIs often come from:
- Old versions left running
- Internal endpoints exposed by mistake
- Test/staging endpoints reachable from production networks
- Alternate hostnames and aliases
- Forgotten microservices
Look for:
- Different ports
- Non-standard hostnames
/beta,/v1,/v0,/legacy- Direct-to-service access bypassing the gateway
7) Correlate by authentication and authorization patterns
Undocumented APIs may have:
- Different auth schemes
- Missing auth
- Weak authorization checks
- Service-to-service tokens only
Compare:
- Which endpoints require which tokens
- Which roles can access them
- Whether they appear in logs but not docs
8) Build an internal endpoint inventory
Track for each endpoint:
- Method
- Path
- Host
- Auth type
- Owner service
- Source of discovery
- Whether documented
- Risk level
- Last seen in logs
This helps separate “unknown” from “undocumented but intentional.”
9) Monitor for changes continuously
Once you find them, keep watching:
- New routes in deployment diffs
- New paths in gateway logs
- New services in discovery
- New OpenAPI specs
- New endpoint usage in APM
A safe workflow
- Inventory exposed services
- Pull all known docs/specs
- Diff docs against logs/traces/code
- Validate ownership with service teams
- Record findings in an internal catalog
- Remediate accidental exposure
Important note
Only do this in environments you’re authorized to assess. If your goal is security review, I can help you build a defensive discovery checklist or a script to compare OpenAPI specs against gateway logs.
If you want, I can provide:
- a step-by-step checklist
- Kubernetes-specific methods
- cloud-specific methods (AWS/Azure/GCP)
- a sample inventory template