You can create a REST virtual service (virtual API) by specifying resource URLs manually:
From the main menu, select File > New Virtual API:
– or –
On the Dashboard, click Virtual API in the New Test tile:
In the New Virtual API wizard, select REST Resources > Start:
On the next page of the wizard, enter the desired operation URL (path) and specify the operation method (GET, POST, DELETE or another):
The URL must start with a slash (
Do not use query parameters (they are put after the question mark (
?) in the URL string).
Click Add another resource to create multiple operations.
After you specified the needed operations, click Next.
On the next page of the wizard, select the project to add the new virtual API to. To create a new project, select <New Project>.
After you create a virtual service, ReadyAPI offers you to run it immediately, or edit it before starting or deploying.
If you selected to run the virtual service, ReadyAPI will run the service on your computer, and use the HTTP protocol and port 8088 by default. It will display the Virtual Service Overview window, where you can view and simulate virtual operations:
You can view the response data for simulated requests directly in the Virtual Service Overview window. To do this, simply select a request in the operation list. You can also check response data on the Transaction Log page of your virtual service editor.
ReadyAPI creates virtual operations based on the URLs and methods you specified.
For each operation, ReadyAPI creates a sample response with the following data:
Response body: Empty Status code: 200 OK Media type: application/xml
That is, the created virtual service is ready for a run as is.
When entering the URLs in the wizard, make sure to start them with a slash (
/) and do not use query parameters in them, that is, do not use substrings like