In this quick tutorial we learn how to get Postman, how to install it and how to use it to connect to Cisco ACI.

Getting it from Chrome

Postman was popular with its extension for Google Chrome. So the first thing you probably did is navigating to Google Chrome Web Store and downloading the extension.

chrome extension

Then to access the Postman extension, type on the following URL on Google Chrome:

chrome://apps/

You should see an icon now:

Postman icon

A window loads for seconds then displays the following message:

This Chrome App is being deprecated.

chrome app error message

You can ignore the message and continue to the next menus. The Postman dashboard will load normally. But I recommend to use the native App instead because it will be the future of Postman development, which takes us to the next paragraph.

If you installed both the Chrome extension and the native app, then they will both appear on your computer. Click on this icon:

Postman-tutorial

Native app

Go to Postman webpage and download the version that fits your computer OS. Run the normal installation steps. It takes a little time if your computer is as slow as mine :). Click on “skip signing in and take me to the app”.

Postman native app launch

GUI menus

The first thing you encounter in the Postman menu is the Launch window. There you find frequent tasks.

Postman-tutorial

The most important blocks are Environments, Requests and Collections.

Environment

Here you define the environment variables. Just like a programming language, you set a variable Host1 for example as “172.12.33.4”. So instead of typing each time the IP address you type only Host1.

Request

A single unit of Postman instruction is called Request. Consider a Request almost like a function in Python or C, but without a return value.

Collection

You can group your Requests we learned about in the above paragraph in a Collection.

Login to Cisco APIC

I’ve collected here a couple of nice blog posts about the theme. They are good illustrated so I won’t rewrite the same thing:

  • Using Postman to send JSON API Requests to Cisco APIC:
  • Using Postman to send XML API Requests to Cisco APIC:

Additional documentation for using Postman or the REST API in the context of Cisco APIC can be found here:

Error Messages

could not get any response

You may encounter a connectivity issue between Postman and Cisco APIC where you see the following error message:

could not get any response

Then there was an error connecting to https://172.16.77.1/api/aaaLogin.json. One troubleshooting step could be to disable SSL verification:

Postman-cisco-apic-login

Postman-cisco-apic-login

403 Forbidden

  • Another error message that can appear while you are doing something else with Postman and APIC (such as creating Tenants with API REST calls) is :

Status 403 Forbidden

and in the body you see:

<error code=”403″ text=”Token was invalid (Error: Token timeout)”/>

then you need to relogin to the APIC to renew the token. You can leverage the requests we created in the previous section.

Postman 400 Bad Request

This can occur if you have written a wrong attribute in the XML or JSON instruction.


Keyboard Banger

Keyboard Banger is a network engineer from Africa. He has been working in network support and administration since 2008. He started writing study notes about certification exams and technology topics a couple of years ago. When he's not writing articles, he can be found wandering on technical forums.

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *