Create An Organization - VMware VCLOUD API 1.0 - API Programming Manual

Table of Contents

Advertisement

Create an Organization

To create an organization, a system administrator POSTs an AdminOrg body to the vCloud's orgs URL, as 
shown in Example
The response echoes the request, with several important additions:
It includes both the administrative and user URLs for the new organization. The administrative URL is 
the value of the href element of the AdminOrg body, and the user URL is the value of the Link where 
rel="alternate".
It includes links that an administrator can use to modify or remove the new organization. For example, 
an administrator could use this Link to add a catalog.
<Link rel="add" type="application/vnd.vmware.admin.catalog+xml"
Example 6-3. Create an Organization
Request:
POST http://vcloud.example.com/api/v1.0/admin/orgs
Content-Type: application/vnd.vmware.admin.organization+xml
...
<AdminOrg xmlns="http://www.vmware.com/vcloud/v1" name="ExampleFinance"
<Description>Example Corporation's Finance Organization</Description>
<FullName>Finance</FullName>
<Settings>
<CanPublishCatalogs>true</CanPublishCatalogs>
<DeployedVMQuota>0</DeployedVMQuota>
<StoredVmQuota>0</StoredVmQuota>
<OrgLeaseSettings>
<DeleteOnStorageLeaseExpiration>false</DeleteOnStorageLeaseExpiration>
<DeploymentLeaseSeconds>604800</DeploymentLeaseSeconds>
<StorageLeaseSeconds>2592000</StorageLeaseSeconds>
</OrgLeaseSettings>
<OrgLdapMode>SYSTEM</OrgLdapMode>
<OrgEmailSettings>
<IsDefaultSmtpServer>true</IsDefaultSmtpServer>
<IsDefaultOrgEmail>true</IsDefaultOrgEmail>
<FromEmailAddress>Admin@example.com</FromEmailAddress>
<DefaultSubjectPrefix>Attention</DefaultSubjectPrefix>
<IsAlertEmailToAllAdmins>true</IsAlertEmailToAllAdmins>
<SmtpServerSettings>
</SmtpServerSettings>
</OrgEmailSettings>
</Settings>
</AdminOrg>
Response:
201 Created
Content-Type: application/vnd.vmware.admin.organization+xml
...
<AdminOrg xmlns="http://www.vmware.com/vcloud/v1"
<Link rel="down" type="application/vnd.vmware.vcloud.tasksList+xml"
<Link rel="add" type="application/vnd.vmware.admin.catalog+xml"
<Link rel="add" type="application/vnd.vmware.admin.user+xml"
<Link rel="add" type="application/vnd.vmware.admin.group+xml"
VMware, Inc.
6‐3.
href="http://vcloud.example.com/api/v1.0/admin/org/26/catalogs"/>
type="application/vnd.vmware.admin.organization+xml">
<IsUseAuthentication>true</IsUseAuthentication>
<Host>smtp.example.com</Host>
<Username>admin@smtp.example.com</Username>
href="http://vcloud.example.com/api/v1.0/admin/org/26" name="ExampleFinance"
type="application/vnd.vmware.admin.organization+xml">
href="http://vcloud.example.com/api/v1.0/tasksList/26"/>
href="http://vcloud.example.com/api/v1.0/admin/org/26/catalogs"/>
href="http://vcloud.example.com/api/v1.0/admin/org/26/users"/>
href="http://vcloud.example.com/api/v1.0/admin/org/26/groups"/>
Chapter 6 Administrative Operations
95

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VCLOUD API 1.0 - API and is the answer not in the manual?

Questions and answers

Table of Contents