Download and Install Insomnia For API Development

Your Paragraph Text

APIs play a crucial role in powering modern web applications and mobile apps and are becoming increasingly prevalent in the software industry.

As a developer, it’s essential to have a robust tool for developing, testing, and monitoring your APIs; this is where Insomnia comes in. Insomnia is a comprehensive API Development kit that allows you to perform these tasks easily.

This article will walk you through downloading and installing Insomnia on an Ubuntu operating system. Testing your APIs before deploying them to production is an important part of the development process, and Insomnia makes it a breeze.

So, if you’re looking to up your API development game, keep reading to learn how to get started with Insomnia!

Also read: How to install AppImages on Linux

How to Install Insomnia

First, visit your favorite browser and search for Download Insomnia. The first link will be from insomnia.rest. Visit the link and click on the button which says “Download Insomnia for Ubuntu”. After downloading the file, locate the Downloads folder in your file manager and right-click and open it in the terminal, which will open the folder in your terminal. Now run the following command to install Insomnia on your system:

sudo dpkg -i <filename.deb>

After some time, Insomnia will be installed on your system! You can go ahead and launch the program using the below command:

insomnia

Which will launch the app in your window.

You can also download the Insomnia app in the form of an AppImage. You can find the links on the official Github releases page, and from there, you can click on the AppImage option link to download the package as an AppImage.

Github releases page for Insomnia
Github releases page for Insomnia

Next, locate your Downloads directory and right-click on the downloaded appimage file. Go to properties and enable the file to run as a program.

Enable to run as Program
Enable to run as Program

Now you can double-click on the file to launch the program!

Launching Insomnia
Launching Insomnia

Also read: How to install and setup IntelliJ IDEA community edition on Linux?

How to test APIs with Insomnia

Now to test that Insomnia is working as it should, we can run a simple test. For that, copy the following link to your clipboard:

https://jsonplaceholder.typicode.com/posts

Now, launch Insomnia, paste the link in the GET field, and click the Send button. You should now see a response to this, and Insomnia will fetch you all the API responses.

Insomnia fetching results
Insomnia fetching results

Now hit Ctrl+N to set up a new request, or you can locate the drop-down menu and select New Request. Now paste the following link in the given field and click on Send.

https://httpbin.org/get
Response from httpbin website
Response from httpbin website

Insomnia is an electron application that runs using a standalone chromium web browser, and the app runs on JavaScript! So it does not matter which distribution you are using. There is a build that works for everything.

Here are 5 APIs for you to try out

Now let us go through 5 fun APIs you can integrate into your next project! The first is an API to get a random commit message to include in your code push. Here’s the official website for the WhatTheCommit API. And the API link is as follows:

https://whatthecommit.com/index.txt

Now the second one is for startup ideas. It will generate ideas, and your startup should align with both. Here’s the official website for the ItsThisForThat API. And the API link is given under.

https://itsthisforthat.com/api.php?text

The third on our list is a robot avatar generator for your website. You can generate unique robot avatars for all your users, and this detail will overshine using the same basic avatar for every other new user. You can visit also RoboHash’s official website.

https://robohash.org/<name>
Passing "writwik" generates the above robot avatar
Passing “writwik” generates the above robot avatar

If you want custom QR codes for your app or website, you can the QR Code Monkey API. You can give your logo and set a gradient for your QR code! And last but not the least, if you are a movie buff, try the imdb-api.

Conclusion

In this article on LinuxForDevices we learned how to download and install the Insomnia API Development kit to test our APIs. I hope you guys liked this tutorial and are looking forward to reading more and more articles.