Insomnia – RoaringAppsInsomnia is a free cross-platform desktop application that takes the pain out of interacting with HTTP-based APIs. Insomnia combines an easy-to-use interface with advanced functionality like authentication helpers, code generation, and environment variables
It can be downloaded from www.insomnia.rest.

This article describes how to successfully import API specification to Insomnia and how to start working with the Connect API.

Prerequisites

Before starting to work with the Insomnia client, make sure that all prerequisites are met.

Specifically, it is required to create a Custom token on Connect, assign required permissions and copy your API Key/Handle value.

Additionally, make sure that Insomnia uses correct API endpoint for making calls.

API Specification Import

Before starting to work with Insomnia, it is recommended to familiarize yourself API specification via the Open API specification page. This page also allows accessing specification URL and downloading specification file.

Import API specification to the Insomnia client as described below:

  1. Click on the arrow next to the Create button on the Insomnia interface.
  2. Select Import From – File to import your downloaded API specification file.
    Alternatively, choose Import From – URL to paste the specification URL.
  3. Click Request Collection once the client prompts to select one of the import as options.

Therefore, API specification will be successfully imported to Insomnia. Access this specification by selecting the CloudBlue Connect API collection from the dashboard.

Environment Configuration

Once the API specification is imported successfully, it is required to access your created collection and edit the Open API environment. The following instructions showcase how to successfully configure the required environment:

  1. Click on the selected environment (OpenAPI env) at the upper left corner of the Insomnia interface.
  2. Select Manage Environments under General.
  3. Edit the OpenAPI environment within Sub Environments as follows:
    • host: Make sure that provided host includes correct API endpoint.
    • authorization: Paste your API Key/Handle value.

4. Click Done to save your environment configuration.

Thus, it will be possible to test out your configuration and start working with the Insomnia client.

Make a Sample Call

Once your environment is configured, make a sample call to test out the Insomnia client functionality.

For example, get your account information on the CloudBlue Connect platform by sending the Accounts – Get Accounts call:

The result of your API call will appear at the right side of the Insomnia window.

In case more information on the Insomnia client is required, please refer to Getting Started with Insomnia.

Is this page helpful?
Translate with Google
Copied to clipboard