Insomnia is a free, open-source, cross-platform desktop application that makes interacting with GraphQL servers more straightforward than ever before. It provides you with gRPC and REST endpoints, so there’s no need to worry about which one will work best for your needs! One of the most common uses is to test GraphQL APIs and HTTP-based RESTful APIs.
The following tutorial will teach you how to install Insomnia on Ubuntu 22.04 LTS Jammy Jellyfish. The tutorial will import the official repository and gpg key and update and remove software using the command line terminal.
Table of Contents
Update Ubuntu
Before proceeding with the tutorial, ensuring your system is up-to-date with all existing packages is good.
sudo apt update && sudo apt upgrade -y
Install Required Packages
The following dependencies will need to be installed. Most of these packages are already on your system, but running the command can help ensure they are installed.
sudo apt install apt-transport-https -y
If you skip and encounter issues, return and just run the command.
Install Insomnia
The first step is to import the repository using the following command.
echo "deb [trusted=yes arch=amd64] https://download.konghq.com/insomnia-ubuntu/ default all" | sudo tee -a /etc/apt/sources.list.d/insomnia.list
Now run an APT update to reflect the newly imported repository.
sudo apt update
Finally, you can install the software using the following command.
sudo apt install insomnia -y
How to Launch Insomnia
Launching can be done in a few ways now that you have the software installed.
Using the command line terminal, you can open it quickly by using the following command.
insomnia
The best way to use software for desktop users that prefer not to use the command line terminal is to open the GUI of the application by following the path.
Activities > Show Applications > Insomnia
Example:
Once open, you can begin using Insomnia.
Example:
How to Update/Upgrade Insomnia
The software should update by itself with your system packages for desktop users using the APT package manager. For users who want to check manually, use the following command in your terminal.
sudo apt update && sudo apt upgrade
How to Remove (Uninstall) Insomnia
When you no longer want the video conference software installed on your system, use the following command to remove it.
sudo apt autoremove insomnia --purge -y
Remove the repository if you plan not to re-install the software again.
sudo rm /etc/apt/sources.list.d/insomnia.list
Comments and Conclusion
Insomnia is a powerful, user-friendly REST client that can be used to test GraphQL APIs and HTTP-based RESTful APIs. It incorporates sophisticated features like code creation, security helpers, environment variables, and a user-friendly user interface. If you want to take advantage of all Insomnia offers for API testing, be sure to check it out!