Empower customer to run RESTful API calls like those mentioned in:
Symptoms:
Customer may need to run RESTful API calls against NSX Manager but not have a RESTful client set up. This KB aims to assist in setting up POSTMAN in a customer environment and test proper configuration
Visit getpostman.com
(Note that we want to install the full application, not the Chrome plugin, as it has some settings we'll want to adjust)
Select "Download the App"
Choose your platform and select "Download"
Once the file has downloaded, run the exe
On first startup, POSTMAN will offer a sign up page. You can either sign up, or below, you can select "Take me straight to the app. I'll create an account another time."
Under the Authorization tab,
Select "Basic Auth" from the Type dropdown box
Next to that, put in the Username and Password for the NSX Manager
Note: Username is almost always "admin"
Under the Headers tab,
We'll add a new Key with a specific Value
Under Key, begin typing "Content-Type" and select it from the dropdown
Under Value, type "application/xml" and select that value from the options
In the top right of the application is a Wrench symbol, click that
Select "Settings" from the drop down
A new window will open, click on the "General" tab
Find the "SSL certificate verification" and toggle this to "OFF"
Close the Setting Window with the X at the top right
Now we'll test API calls to the NSX environment to make sure everything is set up correctly
In the URL bar next to the "GET" type the following:
https://<NSX-Manager-IP-Address>/api/2.0/vdn/controller
Make sure to replace the <NSX-Manager-IP-Address> with the actual IP Address or FQDN of the NSX Manager
This command retrieves details and runtimes of all controllers in the environment. This should provide output if the environment has controllers or not, and is safe to run during production hours.
Expected output should look something like this:
Responses:
Status Code: 200
Body: application/xml
<controllers>
<controller>
<id></id>
<name></name>
<description></description>
<ipAddress></ipAddress>
<status></status>
</controller>
</controllers>
If this GET command returns valued, REST API is configured correctly and can be used for further REST API calls.
API calls to the NSX Manager are commits just like GUI configuration changes.
GET commands retrieve information
POST commands create new content
PUT overwrites content
DELETE removes content