NSX API

NSX API: What it is, Why It Matters, How to Get Started

The NSX API is a new way to automate and streamline several tasks when implementing VMware NSX. The old method of using the VMware vSphere APIs for Virtualization or custom scripts to manage and monitor your environment has been replaced with an updated and streamlined set of APIs that are easy to use, understand, and integrate into your existing workflow. If you’re looking to automate some tasks with the new NSX API, we’ve got you covered. In this article, we’ll walk you through everything you need to know about the new API to get started and begin automating tasks today.

What’s New with the NSX API?

There are a number of changes to the NSX API that make it easier to integrate into an existing workflow and also make it easier to use. The most notable changes are related to the authentication and authorization method of using the API.

Authentication : There are now two authentication methods available when using the NSX API: User name and password - This method uses Basic authentication and is the same method used to access the vSphere Web and API. User certificate - This method uses a certificate to authenticate to the NSX API.

Authorization : Authorization methods have also received an overhaul. The new NSX API can be authorized using a Role-Based Access Control (RBAC) model with predefined roles and permissions.

Why is the NSX API Important?

The NSX API is an important piece of the NSX puzzle and critical for organizations that wish to automate tasks or integrate NSX into their existing workflow or toolset. The NSX API is a REST-ful API that can be used to automate tasks such as deploying, configuring, and monitoring the health of the NSX environment, as well as managing the networking and security policies that are deployed throughout the environment. Using the NSX API, organizations can integrate NSX with other tools/methodologies, be it Orchestration, Service Providers, or third-party monitoring and management solutions. Since the NSX API is built to be easy to use, organizations can quickly and easily integrate the NSX platform into their existing workflow.

Automate Networking Tasks with the NSX API

One of the most common tasks that can be automated with the NSX API is related to the networking piece of your environment. There are a number of tasks that you can automate with the NSX API, and one of them is deploying a new Logical Switch or Virtual Network. To deploy a new Logical Switch or Virtual Network using the NSX API, you will need to first create a Networking Resource using the API. Once you have created the Resource, you will have to specify the following:

  • Name - Logical Switch name or Virtual Network name.
  • Network Location - The location where the Resource will be deployed.
  • IP Space - The IP space that will be associated with the Resource.
  • Networking Service Providers - Service Providers associated with the new Resource.

Once you have specified all of the above, you can then go ahead and deploy the new Logical Switch or Virtual Network using the NSX API.