Export and Import Service with all Transactions

Services are logical groupings for Transactions and Mock Services, usually named after a specific live service. Anytime you upload Transactions or create a new Mock Service, you are prompted to assign it to a Service, to create a new Service or assign a default. You can export all the transactions that are under a specific service as a JSON file. You can then import all the Transactions from the JSON file somewhere else.

Example use cases:

  • You have Workspace A and Workspace B in your environment. There are transactions in the Asset catalog as a part of an existing service in Workspace A. You want the same transactions in Workspace B as well. You can export the JSON file with transactions from Workspace A and upload the JSON file to Workspace B. If any of the transaction already exist in Workspace B, we append a timestamp to the imported transaction name.

  • To prevent accidentally losing your Services, you want to periodically make backups. Export the Services as JSON files to be able to import them back later. This enables you to restore any Services, including transactions, processing actions, and associations.

This article covers the following topics:

Export All Transactions in a Service

Export transactions from a specific service to a JSON file.

Follow these steps:

  1. Navigate to the Service Virtualization tab and expand the Service drop-down list.
  2. Hover over the service entries to see the pop-up action icons next to each entry.
  3. Click the Export All Transactions From This Service action icon for the service that you want to export.
    export-transactions.png

A JSON file is downloaded and named after the service name.

Example: For a service named Default Service, the JSON file name is Default Service.json.

Import Transactions from the Exported JSON File

There are two ways to import transactions:

  • To import all the Transactions that are in the Exported JSON file, click the Asset Catalog tab and drag and drop the JSON file into the upload area.

asset catalog upload

  • Click the Service Virtualization tab, +, Create from Transactions and drag and drop the file in the upload area.

create mock service from transactions

mock services transactions

For more information about Export API, see Export API.