Using the REST API with the Postman REST client
In this recipe, we will use the Postman REST client to perform a REST API call to NSX. The Postman REST client can be downloaded here: https://www.getpostman.com/. Other alternative REST clients include the RESTClient Firefox add-on: https://addons.mozilla.org/en-US/firefox/addon/restclient/.
Getting ready
To use the NSX REST API, you must understand the general RESTful workflow, and then install and configure a REST client. The NSX Manager uses TCP port 443
for REST API requests, so you must verify that the ports are opened between the REST client and the NSX Manager. In addition to this, you must either use a trusted certificate or accept the self-signed certificate when making a REST API call to the NSX Manager.
How to do it...
This recipe is divided into two parts of REST API requests using the Postman REST API client: retrieving a configuration or information using HTTP GET
, and creating a logical switch using HTTP POST
.