As has been purported many times it is possible to create objects via a RESTful API. Lets first look at the logical network segments in my environment. Whilst I show the GUI creation here this post highlights the the GUI method.
There are none. This is a fresh instance. Now I am going to open up my web browser, in this case it is Mozilla, and click on my RESTClient plugin.
The REST client requires some details first. Authentication so it can communicate against the NSX manager and the Content-Type. It needs to know that it is posting XML data.
This requires me to put in based on my environment POST:https://nsxmgr-l-01a.corp.local/api/2.0/vdn/scopes/vdnscopes-1/virtualwires
The XML required for the creation of my switch is as follows:
Web Tier LS
We can see confirmation of the creation of our logical switch with the following output.
Status Code: 201 Created
Date: Mon, 02 Jun 2014 23:07:25 GMT
Server: vShield Manager
Time to confirm this against the webGUI.
There we are. It is simple to use POST or GET to retrieve and deploy environments. It is possible, depending on your ability to use an API at scale to manager and run your environment based on the API! Pretty cool stuff.