Services are logical groupings for Transactions and Mock Services. You can clone Transactions that are under a specific service to a new service. You can also find and replace a specific text in Transactions while cloning. You can create a Mock Service that contains all the transactions that have been cloned. After you clone a transaction, a Mock Service under the new service is created.
- Clone All Transactions in a Service
- Find and Replace Text in Transactions while Cloning
- Create a Mock Service after Cloning
Clone All Transactions in a Service
Follow these steps:
- Navigate to Mock Services and expand the Service drop-down list.
- Hover over the service entries to see the pop-up action icons next to each entry.
- Click the Clone Service icon for the service that you want to clone.
A new Clone Service window opens. - Enter a service name.
Note: Use a unique service name for each clone. If the service name already exists, the Clone button is disabled. For APIs, a clone with a duplicate service name will return an HTTP 400 Bad Request error message. See Cloning API for more information.
- Click Clone.
Find and Replace Text in Transactions while Cloning
Use this option if you want to modify parts of transactions while cloning. For example, you might need to change an API version from v1 to v2 for all transactions. You can make this change in bulk while cloning, instead of manually.
Follow these steps:
- Navigate to Mock Services and expand the Service drop-down list.
- Hover over the service entries to see the pop-up action icons next to each entry.
- Click the Clone icon for the service that you want to clone.
A new Clone Service window opens. - Enter a service name.
Note: Use a unique service name for each clone. If the service name already exists, the Clone button is disabled. For APIs, a clone with a duplicate service name will return an HTTP 400 Bad Request error message. - Toggle the Find and Replace Text in Transactions button on.
- Enter a text to Find and a text to Replace it with, and a Location.
You can find and replace in the following entities:- Query Parameters
- Cookies
- Request Headers
- Request Body
- Response Headers
- Response Body
- Proxy URL
- Path
- Everyhwere
- (Optional) Click the Plus button to search and replace more strings.
- (Optional) Click the Delete button to remove a line.
- Click Clone.
Create a Mock Service after Cloning
Use this option if you wish to have a Mock Service created with all the transactions that have been cloned.
Follow these steps:
- Navigate to Mock Services and expand the Service drop-down list.
- Hover over the service entries to see the pop-up action icons next to each entry.
- Click the Clone icon for the service that you want to clone.
A new Clone Service window opens. - Enter a service name.
Note: Use a unique service name for each clone. If the service name already exists, the Clone button is disabled. For APIs, a clone with a duplicate service name will return an HTTP 400 Bad Request error message. - Toggle the Create Mock Service for Cloned Service button ON.
- Click Clone.
You will be redirected to the Mock Service page. A Mock Service under the new service is created and contains all the transactions that have been cloned. - Verify the created Mock Service and click Run to deploy the cloned Mock Service.
If you are a workspace manager or administrator, you can rename or delete a service. For more information, see Rename or Delete a Service.
0 Comments