Discovering APIs

Applies to ReadyAPI 3.54, last modified on September 23, 2024

API discovery is the process of recording requests to a web service. While you are working with a web service, ReadyAPI is watching HTTP traffic and recording requests. The recorded requests can be used to create a test case or an API definition.

Why Using API Discovery

The main purpose of API discovery is to quickly create a test case that simulates realistic user behavior. While you are interacting with a service, ReadyAPI is collecting data on the sent requests. By specifying an API definition you can filter the recorded requests and create a test case using only those requests that were sent to the specified web service. To learn more, see Record Test Case Tutorial.

If a web service does not provide a definition, you can use API discovery to create it. In this case, you explore the web service and then use the data collected from the recorded requests to create an API definition. To learn more about this approach, see Discovery Tutorial.

Discovery Methods

To discover API you can use internal ReadyAPI browser or use external browser or a client application that runs traffic through ReadyAPI proxy.

Internal Browser

ReadyAPI internal browser acts as any other Internet browser – it sends requests and receives responses, then displays the generated web page. When recording requests in this way, you will get all requests sent to the server, not only the requests to the database. For example, you may record separate requests for images on the web page you load, for the login procedure and for the web page displayed after the login. You can select the requests you need after the recording.

Requests sent from the internal browser also carry the appropriate user agent, so the server can properly respond to them.

Using Proxy

To record requests that cannot be simulated from a browser, you can set ReadyAPI to act as a proxy. Then, only the requests that you send through the proxy are recorded. You can set up any application to send these requests. Since most applications only work with the API to get the necessary data, you will get a lot less unneeded information. ReadyAPI can record both HTTP and HTTPS requests.

See Also

Working With APIs

Highlight search results