179487671-660x454.jpg

Getting started with WAPIs using Insomnia

Infoblox offers a rich set of Web-based Application Programming Interfaces, also called WAPIs, that allow you to easily integrate NIOS into your automation environment. This blog gives you an insight on why to use these WAPIs.

To get you started quickly, we have created an Insomnia collection of the RESTful Infoblox APIs.

Insomnia 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.

Insomnia is available for Mac, Windows, and popular Linux distributions. Visit the Downloads page to download the installer for your operating system.

Below is a screenshot of Insomnia for Windows.

Image1_Insomnia.png

There is one file zipped into an attachment included with the blog.

 This file is a collection of a sample set of WAPI calls, and the environment variables (see the table below) that are used within the collection.

Variable

Description

grid_master

This is the IP address of your grid master.
(Example: 172.26.1.2)

Base64_encoding

The HTTP Authorization request header contains the credentials to authenticate a user agent with a server. Here, we use the "Basic" authentication scheme. The credentials are constructed like this:

  • The username and the password are combined with a colon
    (Example:- admin:infoblox)
  • The resulting string is base64 encoded
    (Example:- YWRtaW46aW5mb2Jsb3g=)

wapi_version

This is the WAPI version supported by your grid.

(Example: v2.10)

object_reference

Every WAPI Object is referenced by a unique Object Reference that is used to identify the object for all the operations. Substitute this variable with the reference of the object you want to work with.

(Example:- record:host/ZG5zLmhvc3QkLl9kZWZhdWx0LmNvbS5pbmZvLnByaW50ZXI: printer.info.com/default)

To try out the WAPI calls, download, unzip and import the file into your application.

  1. To import the file into your environment, either
    • click on Import from File on the landing page, or
    • click on the downward arrow next to Insomnia, and select Import/Export
      Image2_Import.png
  2. Selecting the latter option, opens a new window. Select Import Data, followed by From File.
    Image3_ImportWindow.PNG
  3. Select the downloaded and unzipped file in the pop-up window.
    Image4_Upload.png
  4. Once uploaded, you will see the following message.
    Image5_UploadMessage.png
  5. The navigation pane on the left now contains the list of sample WAPI calls that you can try out.
    Image6_Collections.png
  6. Before getting started, select the Infoblox WAPI environment variables.
    • First, populate it with values specific to your environment.
      1. In order to do so, click on Manage Environments.
        Image7_EditEnvironment.png
      2. Fill in the grid master IP address, Base64_encoding, and wapi_version details.
        Image8_EditEnvironmentVariables.png
      3. The object_reference variable only needs to be updated when a WAPI call has it mentioned. For example, PUT Authoritative Zone.
        Image9_EditObjectReference.png
      4. Click on Done
    • Select the environment by clicking on Use Infoblox WAPI Environment Variables.
      Image10_SelectEnvironment.png
  1. You are all set now. To try out any of the WAPI calls in the collection. Select a WAPI and click on the Send. You will see a response in the right pane.
    Image11_TryWAPI.png
  2. Click on the downward arrow next to the WAPI and select the Generate Code option to generate a code snippet for the WAPI call in any language of your choice.
    Image12_GenerateCode.pngImage13_GeneratedCodeI.png

Infoblox WAPIs are simple and easy to use with any REST client. Download the attachments and leverage Insomnia to get familiar with them. Happy testing!

P.S: You can refer to this guide, for more information on WAPIs.

Showing results for 
Search instead for 
Do you mean 

Demo: Infoblox IPAM plug-in integration with OpenStack Newton