Creating a tenant using REST and XML
When we created the TenantA tenant, way back in Chapter 2, Configuring Policies and Tenants, it was very straightforward. We named the new tenant, pressed Submit,Â
and the tenant was created. Creating a tenant using the REST client is no harder.
How to do it...
- From Postman, set the URL to
https://192.168.1.205/api/mo/uni.xml
. - On line one, enter the following:
<fvTenant name="TenantA"/>
- Press
Send
.
How it works...
You may need to reauthenticate if you get a status of 403 Forbidden
 and the following returned:
<?xml version="1.0" encoding="UTF-8"?> <imdata totalCount="1"> <error code="403" text="Token was invalid (Error: Token timeout)"/> </imdata>
If this is the case, then you can repeat commands from the list on the left-hand side.
If all worked well, in the result, you should get a status of 200 OK
 and the following code:
<?xml version="1.0" encoding="UTF-8"?> <imdata totalCount="0"></imdata>
Here is the tenant...