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 to a JSON file. You can also import all the Transactions that are in the Exported JSON file.
Example use case: 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 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.
Note: If any of the transaction already exist in Workspace B, we append a timestamp to the imported transaction name.
Export All Transactions in a Service
Export transactions from a specific service to a JSON file.
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 Export All Transactions From This Service action icon for the service that you want to export.
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.
Click the Mock Services tab, +, Create from Transactions and drag and drop the file in the upload area.
For more information about Export API, see Export API.
0 Comments