# Basic Insomnia management

## Importing collection

In the Insomnia home screen, click `Create`, then `Import`. In the new import screen, select the JSON contents of the API you want to import and click `Scan`. Once complete, it will preview the new assets that will be in the collection, as well as give a chance to name the collection. Name the collection something appropriate for the collection document and click `Import`. You will be taken to the new document which should include any tests, endpoints, and environments included in the original document. This will _not_ include the API spec, and would need to be pulled in manually if you wish to use the spec screen.

## Sample README for new rsync'd specs

To make using insomnia easier, we are beginning to use managed versions stored on API VMs as the embedded credentials that could prove to be an issue even in private repositories. Below is a sample of the readme to provide to users to ensure that we consistently provide all needed environment info for team members to make use of the included API schemas.

## Updating docs and JSON

Before starting updates to the documentation and Insomnia workspaces, please ensure that the version of the files in the workspace is up to date by re-importing them.

To update the JSON and documentation for the current folder, please do the following command from within this folder:

`rsync -r "$PWD" api-vm1:~/webdev/insomnia/`

## Spec location

URL: https://gitlab.eclipse.org/eclipsefdn/it/api/eclipsefdn-some-api/-/raw/main/spec/openapi.yaml