Creating a tenant using REST and JSON
Once you get used to the syntax, it is pretty easy to switch from XML to JSON. We can create a tenant using a few lines.
How to do it...
- Use the URLÂ
https://192.168.1.205/api/mo/uni.json
. - Use the following code:
{ "fvTenant" : { "attributes" : { "name" : "TenantB" } } }
- Press
Send
.
How it works...
In the same way that we created a tenant through the GUI and through XML, we can create one through JSON. Â If we run the command and look at the GUI, we can see the new tenant listed: