Prompt
How do I find all the APIs my company exposes, including shadow APIs?
Latest observation
Oct 29, 2026
OpenAI APIWeb search: off
To find all APIs your company exposes — including “shadow APIs” — use a mix of inventory, traffic discovery, and enforcement.
1) Start with the known sources
Collect API records from:
- API gateways (Kong, Apigee, AWS API Gateway, Azure API Management, etc.)
- Ingress controllers / load balancers (NGINX, ALB, F5, Cloudflare)
- Service meshes (Istio, Linkerd)
- Developer portals / API catalogs
- CI/CD and IaC (OpenAPI specs in repos, Terraform, Helm, CloudFormation)
- Cloud provider metadata (VPC Flow Logs, ALB logs, API Gateway logs)
- DNS records and TLS certificates (often reveal forgotten hosts/subdomains)
This gives you the “declared” APIs.
2) Discover what’s actually exposed
Shadow APIs are often found by observing real network traffic and active endpoints.
Passive discovery
Use logs/telemetry to identify API-like traffic:
- Reverse proxy logs
- WAF logs
- Application logs
- Traces/APM (Datadog, New Relic, OpenTelemetry)
- Network flow logs
Look for:
- URL paths with
/api/,/v1/,/graphql,/rest,/swagger,/openapi - Repeated JSON responses
- Unusual hostnames/subdomains
- Internal-only services reachable externally
Active discovery
From authorized internal scanning or controlled testing:
- Enumerate subdomains
- Crawl documented apps and mobile/web clients
- Inspect frontend JS bundles for hidden endpoints
- Use API discovery tools that probe common routes and methods
- Compare responses for different HTTP verbs and content types
3) Compare “observed” vs “documented”
Create a canonical inventory and diff:
- Documented APIs: specs in Git, gateway configs, portal entries
- Observed APIs: endpoints seen in logs/traces/scans
Flag anything that is:
- Not in the API catalog
- Not protected by gateway/auth
- Exposed on a public IP or public DNS
- Backed by a service but missing owner, spec, or security review
4) Hunt for shadow APIs specifically
Shadow APIs often come from:
- Old versions left online (
/v1,/legacy,/beta) - Direct-to-service exposure bypassing the gateway
- Debug/admin endpoints
- Staging environments accidentally public
- Microservices publishing their own endpoints
- Mobile/web app endpoints not registered in the portal
- Third-party SaaS integrations and webhook endpoints
Search for:
- Non-gateway public listeners
- Separate ports (8080, 8443, 5000, 9000, etc.)
- “/internal”, “/admin”, “/debug”, “/actuator”, “/metrics”
- OpenAPI/Swagger docs accidentally exposed
- GraphQL introspection or playgrounds
5) Automate ongoing detection
Implement continuous controls:
- API inventory platform or CMDB
- Traffic-based API discovery from logs/observability
- Daily diffing of exposed hosts/endpoints
- Certificate/subdomain monitoring
- IaC policy checks to prevent new public exposures
- Gateway enforcement: deny APIs that aren’t registered
6) Validate ownership and risk
For each discovered API:
- Owner/team
- Business purpose
- AuthN/AuthZ requirements
- Data sensitivity
- Internet/internal exposure
- Version and deprecation status
- Logging/monitoring coverage
Prioritize unknown or unauthenticated endpoints first.
7) Useful tools/categories
Depending on your stack, consider:
- API gateways: built-in analytics/inventory
- Observability: OpenTelemetry, Datadog, New Relic, Splunk
- Cloud logs: ALB/NLB logs, API Gateway logs, Flow Logs
- Asset discovery: service catalogs, CMDBs
- Security platforms: API security tools that discover and classify APIs from traffic
- Subdomain/cert monitoring: certificate transparency, DNS inventory tools
Practical workflow
- Export all declared APIs from gateway/spec repos.
- Pull 30–90 days of traffic logs and extract unique hosts + paths.
- Enumerate public DNS and certificates.
- Crawl apps and inspect frontend/mobile clients for API calls.
- Diff against the approved catalog.
- Investigate anything unmatched.
- Put controls in place so new APIs must be registered before exposure.
If you want, I can also help you build:
- a step-by-step discovery runbook,
- a SIEM query set for finding shadow APIs,
- or a Python script to compare gateway specs vs observed traffic.