Before v1.16.0, exporting data in Mockoon's format was necessary to share your mocks with other users and to run them with the CLI. Since this update, both the desktop application and the CLI can load Mockoon's environments files directly without exporting them. Learn more
Import/export in Mockoon's format may be removed in the future
To export all environments to a file, open the Import/export menu, select Mockoon's format and then Export all environments to a file (JSON):
The environments exported in older versions will be automatically migrated if imported in a more recent version. Once migrated, environments cannot be imported anymore in an older version.
To export a specific environment or route's JSON data to the clipboard, right-click on the environment or route and select Copy to clipboard (JSON):
The resulting JSON is fully compatible with the file-based import. It can either be imported through Import/export > Mockoon's format > Import from the clipboard, or copied in a JSON file and imported through Import/export > Mockoon's format > Import from a file.
One limitation: a single route copied to the clipboard cannot be imported on a different version of Mockoon as data migration cannot be applied on routes only.
To import data from a JSON file, open the Import/export menu, select Mockoon's format and then Import from a file (JSON):
Any type of export can be imported from a JSON file: environments JSON files or single environment/route copied to the clipboard (see below) and saved to a JSON file. Environments imported from a file will be added at the end of the environments list. No data will be overwritten even if imported environments share the same names. Imported routes will be added to the active environment.
To import data from the clipboard, open the Import/export menu, select Mockoon's format and then Import from clipboard:
As for the JSON import, any type of exported data can be imported through this method.