Insomnia is a super handy tool for API developers, but sharing your collections with team members or making them publicly accessible can feel a bit tricky. Let's walk through how to export a collection and then publish it for public use.
1. Exporting a Collection
First, let's see how to export a collection from Insomnia.
- Open Insomnia and select the collection you want to export.
- Click the three dots on the top right of the collection name and choose "Export (JSON)".
- A dialog will pop up; save the JSON file to an appropriate location.
And there you have it—your collection is now exported as a JSON file.
2. Publishing the Exported Collection
Next, we’ll look at how to publish this exported JSON file.
a. Using GitHub for Publication
- Go to your GitHub repository and create a new directory called insomnia/.
- Upload the exported JSON file into this directory.
- Click on the uploaded file and then click "Raw" on the top right.
This will generate a URL like this:
https://raw.githubusercontent.com/your-username/your-repo/main/insomnia/your-collection.json
You can now use this URL to share the collection with your team members or make it publicly accessible.
3. Introducing EchoAPI
Let’s also introduce you to EchoAPI, a lightweight collaboration tool that can replace Insomnia or Postman. EchoAPI offers these features:
- Supports a scratch pad for ultra-lightweight API development.
- Provides API design, debugging, automated testing, and load testing functionalities.
- Comes with plugins for IntelliJ IDEA, VS Code, and a Chrome request capture extension.
- No login required to use.
If you’re looking for better flexibility and ease of use in API development, give EchoAPI a try.
That’s it! Now you know how to export and publish Insomnia collections. By sharing collections smoothly, your team development can be more efficient.