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.
Then to access the Postman extension, type on the following URL on Google Chrome:
You should see an icon now:
A window loads for seconds then displays the following message:
This Chrome App is being deprecated.
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:
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”.
The first thing you encounter in the Postman menu is the Launch window. There you find frequent tasks.
The most important blocks are Environments, Requests and Collections.
Here you define the environment variables. Just like a programming language, you set a variable Host1 for example as “188.8.131.52”. So instead of typing each time the IP address you type only Host1.
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.
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:
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:
- 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.