API documentation rarely presents the full picture. Runtime API discovery helps security teams identify APIs that are active in deployed environments, compare them with approved records, and uncover undocumented, deprecated, or unmanaged endpoints before they become lasting security blind spots. The practical goal is to create an accurate, continuously updated view of the API attack surface and connect that visibility to ownership, risk-based testing, and verified remediation.
This guide explains how to operate runtime API discovery as a repeatable security process. For a comparison of the main API discovery techniques and their strengths and blind spots, see API discovery methods compared.

Runtime API discovery identifies APIs by observing activity and infrastructure in deployed environments. It uses sources such as API traffic, logs, runtime telemetry, Kubernetes resources, and dynamic scan activity to validate inventories, detect unknown or deprecated APIs, and identify endpoints that need security testing.
An effective runtime API discovery program should:
These practices form an iterative operating model rather than a one-way pipeline. New information about ownership, exposure, dependencies, or testing results can change an API’s classification and priority. Here’s how the process might work:

Before applying the model, however, teams need to establish three things: why runtime evidence is necessary, how it complements the approved inventory, and which runtime signals are relevant to their architecture. The following sections set out that foundation before the step-by-step implementation guidance.
Most organizations already maintain information about their APIs, including:
These sources show what teams intended to build, document, and govern. They do not always show what is still deployed, reachable, or receiving traffic. Documentation can drift from reality for many reasons:
Runtime discovery provides evidence of what is active or reachable now. That evidence can reveal shadow APIs, zombie APIs, direct-origin exposure, missing ownership, gaps in testing coverage, and differences between documented and deployed authentication controls.
However, runtime evidence is not a replacement for documentation or governance records. Its value comes from comparing what teams expect to exist with what the environment actually exposes.
An effective API inventory needs both an intended view and an observed view:
These views are complementary. A mature program continuously compares them and investigates discrepancies rather than treating either one as complete or automatically authoritative.
A runtime-only route may be new, undocumented, misclassified, or incorrectly normalized, while an inventory-only route may be dormant, restricted to a workflow not yet observed, or already retired but never removed from the catalog.
Here’s how static inventory and runtime discovery compare:
Reconciling these two views defines the inventory problem, but it does not yet define the scope of runtime discovery. Before selecting data sources, teams should distinguish discovery from adjacent runtime monitoring and protection activities.
“Runtime” can be an ambiguous term when it comes to APIs, and it’s important to be clear on the differences between discovering APIs at runtime and actually monitoring running APIs to detect performance and security issues:
API discovery may use data generated by monitoring systems, but its primary output is an inventory and classification of API exposure. It does not replace runtime threat detection, gateway controls, or dynamic security testing. Once this scope is clear, teams can choose the combination of runtime and supporting data sources that best matches their architecture.
No single API discovery source provides a complete view, so you always need some combination of them that matches your specific environment:
Static sources such as specifications and code repositories also play a role, but they provide additional correlation inputs rather than runtime evidence – they help explain whether an observed route is expected and provide context that may not be visible in traffic.
Your choice of starting point depends on the architecture:
With the purpose, scope, and source mix established, the next task is to turn those inputs into a governed operating process. The following practices move from building the initial baseline through normalization, reconciliation, classification, testing, remediation, and continuous drift monitoring.
Gather the API information the organization already maintains:
The baseline does not need to be perfect – its purpose is to give runtime observations something to be compared with.
Record the source of each entry. Source attribution helps resolve conflicts and shows which processes repeatedly produce stale or incomplete records.
Gateway logs alone show only governed traffic. Network observations show active calls but can miss dormant APIs. Kubernetes visibility may reveal internal services without proving whether they are externally reachable. To minimize gaps, combine sources that cover different boundaries:
The source mix should reflect the architecture rather than the tool stack – discovery is incomplete when it only mirrors the visibility of one control.
Runtime discovery can process paths, headers, parameters, identities, and payload metadata, so apply data minimization from the start:
Discovery should improve visibility without creating a new repository of sensitive traffic data.
Raw traffic rarely maps cleanly to an API inventory. A single route may appear as thousands of unique paths because requests contain different user IDs, order numbers, tenant names, or timestamps. For inventory purposes, you need to normalize these observations so they can be compared reliably. Here are some examples of normalization:
API versions should usually remain distinct inventory attributes because different versions can have different exposure, authentication, and vulnerability profiles.
At minimum, a normalized API operation should account for:
Poor normalization creates inflated inventories and noisy drift alerts. Overly aggressive normalization can combine distinct operations and hide security-relevant differences.
Preserve representative raw observations so analysts and application owners can see why requests were grouped. Do not discard parameters simply because they are excluded from route identity. They may still represent inputs that require security testing.
Compare normalized runtime operations with the approved baseline. Flag:
Treat discrepancies as classification work rather than immediate vulnerabilities.
An observed mismatch may reflect:
The authoritative inventory should result from reconciliation across technical evidence, ownership data, and approved governance records, not by treating any single data source as authoritative.
Terminology for discovered APIs varies across organizations and vendors. The following working definitions should be mapped to your internal taxonomy where necessary:
Zombie APIs may retain access to the same data and business functions as current versions while receiving fewer patches, tests, and reviews. That combination makes continued traffic to deprecated versions worth prioritizing.
Explicit versioning policies, deprecation windows, sunset dates, client migration tracking, and named owners reduce zombie API risk by making retirement an expected lifecycle activity rather than a discovery-driven cleanup exercise.
Runtime discovery only becomes actionable when responsibility is clear. At minimum, each API should have:
A workable operating model often divides responsibility as follows:
Define service-level expectations for assigning owners, classifying unknown APIs, testing externally exposed APIs, addressing direct-origin exposure, retiring deprecated versions, and resolving exceptions. Without these expectations, discovery backlogs quickly become another source of unmanaged security data.
Discovering the existence of a route doesn’t establish how an attacker could reach it or what the API exposes. Determine whether each API is:
Also identify the broader context:
Pay particular attention to any contradictions. An API described as internal but actually reachable from the internet is more urgent than a missing catalog tag.
Direct-origin access can expose an IP address or alternate hostname that bypasses hostname-based routing, SNI-dependent controls, and protections applied only at the gateway, CDN, or WAF. It may also create TLS configuration problems if clients connect outside the intended hostname.
Discovery order should not determine response priority. Use a consistent set of factors:
An illustrative response model could look like this:
The scoring method does not need to be complex, as long as it supports repeatable decisions that security and application teams can explain.
Discovery establishes that an API exists or is active – it can’t tell you whether the API is secure. APIs selected for security assessment should enter a dynamic testing workflow, but not every discovered endpoint is immediately scan-ready. Authentication, application state, data dependencies, and business workflows often require configuration before meaningful testing can begin.
Moving to testing may require:
Dynamic application security testing (DAST) is a key method for assessing discovered APIs because it evaluates the running application and can identify vulnerabilities that depend on deployed behavior, configuration, authentication, and application responses. For vulnerabilities that can be safely confirmed, Invicti’s API DAST can provide proof that the issue is exploitable. This helps developers distinguish validated findings from issues that still require manual investigation.
Closing a ticket does not prove that exposure is gone. After a fix, configuration change, or retirement decision:
Runtime discovery can show that a supposedly retired endpoint is still receiving requests, while dynamic testing can verify whether a remediation addressed the underlying security issue.
API estates change whenever teams deploy software, modify infrastructure, onboard partners, release mobile applications, or migrate services. Run discovery continuously or at least frequently enough to match the rate of change. Focus alerts on changes that require a decision:
The purpose of continuous discovery is not continuous interruption, so tune alerts around material changes rather than every raw observation.
Endpoint counts provide some context, but they do not show whether the program is working. The following metrics are useful for tracking the performance and effectiveness of discovery:
Track trends rather than isolated totals. A rising API count may be caused by genuine environment growth but also by improved discovery. A shrinking unknown backlog and increasing testing coverage are stronger indicators of program maturity.
Invicti combines multilayered API discovery with dynamic API security testing. Discovery signals from scanning, code, gateways, network traffic, and runtime infrastructure can be correlated into a unified view of the API attack surface.
Relevant APIs can then be prepared for authenticated API DAST. For vulnerabilities that can be safely confirmed, proof-based scanning can provide evidence of exploitability, helping teams move from discovery to prioritized remediation with less manual validation.
The result is a continuous connection between API visibility, vulnerability validation, remediation, and retesting.
For teams deploying several times a day, continuous collection should be the baseline. Slower-moving environments can begin with scheduled reconciliation, provided the cadence is shorter than the typical time between material API changes.
No. Runtime discovery validates and enriches a catalog by showing what is active or reachable. The catalog still provides ownership, business purpose, lifecycle, and governance context that runtime observations alone cannot supply.
It compares observed API operations with approved inventory records. An endpoint seen in traffic, runtime infrastructure, or dynamic scan activity but missing from the approved inventory becomes an unknown API that must be classified. If it is active but missing from approved documentation or management, classify it as a shadow API.
Normalize the observation, confirm that it is distinct, assign an owner, classify its purpose and lifecycle, validate exposure and authentication, assess data sensitivity, and add it to security testing where appropriate.
No single method can. Runtime discovery can miss dormant, rarely used, isolated, or unobserved APIs. It should be combined with static sources, infrastructure data, gateway records, and dynamic scanning.
