Discovering APIs
API discovery is the process of recording requests to a web service. While you are working with a web service, ReadyAPI monitors HTTP traffic and records 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 interact with a service, ReadyAPI collects data on the requests you send. 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 the API, you can use the internal ReadyAPI browser, an external browser, or a client application that runs traffic through the 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 receive all requests sent to the server, not just those 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. Only requests 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.