To create an organization, a system administrator POSTs an AdminOrg element to the cloud’s add URL for orgs.
Prerequisites
This operation is restricted to system administrators.
Procedure
Results
The server creates and enables the organization, and returns an AdminOrg element that includes the contents you POSTed, along with a set of Link elements that you can use to access, remove, disable, or modify it. VMware Cloud Director API users can log in to this organization using the URL specified in the href attribute of the Link where rel="alternate"
. Users of the VMware Cloud Director Tenant Portal can log in to the organization at a URL of the form cloud-url/org/name, where cloud-url is a URL of the form https://vcloud.example.com/cloud and name is the value of the name attribute of the AdminOrg element. To log in to the organization created by Create an Organization, a user opens a browser and navigates to https://vcloud.example.com/cloud/org/Finance.
Example: Create an Organization
This request creates an organization and specifies a few of its properties. Although this example populates the Settings element with a few typical values, the request would be valid even if you left Settings empty. For a list of all required and optional elements that an AdminOrg contains, see the schema reference.
POST https://vcloud.example.com/api/admin/orgs Content-Type: application/vnd.vmware.admin.organization+xml ... <?xml version="1.0" encoding="UTF-8"?> <AdminOrg xmlns="http://www.vmware.com/vcloud/v1.5" name="Finance" type="application/vnd.vmware.admin.organization+xml"> <Description>Example Corporation’s Finance Organization</Description> <FullName>Finance</FullName> <Settings> <OrgGeneralSettings> <CanPublishCatalogs>false</CanPublishCatalogs> <CanPublishExternally>true</CanPublishExternally> <CanSubscribe>false</CanSubscribe> <DeployedVMQuota>0</DeployedVMQuota> <StoredVmQuota>0</StoredVmQuota> <UseServerBootSequence>false</UseServerBootSequence> <DelayAfterPowerOnSeconds>0</DelayAfterPowerOnSeconds> </OrgGeneralSettings> <OrgLdapSettings> <OrgLdapMode>SYSTEM</OrgLdapMode> <CustomUsersOu /> </OrgLdapSettings> <OrgEmailSettings> <IsDefaultSmtpServer>true</IsDefaultSmtpServer> <IsDefaultOrgEmail>true</IsDefaultOrgEmail> <FromEmailAddress /> <DefaultSubjectPrefix /> <IsAlertEmailToAllAdmins>true</IsAlertEmailToAllAdmins> </OrgEmailSettings> </Settings> </AdminOrg>
The response contains information extracted from the request, and includes links that an administrator can use to manage the organization and its settings, and to add resources such as VDCs, catalogs, and users. On creation, AdminOrg objects are disabled by default unless the create request includes an IsEnabled element with a value of true
. A system administrator must enable a disabled AdminOrg before users can log into it.
- OrgPasswordPolicySettings
- VAppLeaseSettings
- VAppTemplateLeaseSettings
- RightReferences
- RoleReferences
When you create an organization, it includes RoleReferences for all predefined roles and a set of RightReferences that contains all rights included in those roles. You can include an explicit set of RightReferences in the AdminOrg request body if you want the organization to include a set of rights that differs from the set it would otherwise receive on creation. If you do this, the predefined roles are created in the organization with a set of rights that is the intersection of the rights in the predefined role and the rights you granted to the organization. A system administrator can add or remove rights after an organization has been created. See Edit Organization Rights.
This example shows only a subset of the actual response.
201 Created Content-Type: application/vnd.vmware.admin.organization+xml ... <AdminOrg xmlns="http://www.vmware.com/vcloud/v1.5" name="Finance" id="urn:vcloud:org:26" type="application/vnd.vmware.admin.organization+xml" href="https://vcloud.example.com/api/admin/org/26"> <Link rel="add" href="https://vcloud.example.com/api/admin/org/26/catalogs" type="application/vnd.vmware.admin.catalog+xml" /> <Link rel="add" href="https://vcloud.example.com/api/admin/org/26/users" type="application/vnd.vmware.admin.user+xml" /> ... <Link rel="add" href="https://vcloud.example.com/api/admin/org/26/roles" type="application/vnd.vmware.admin.role+xml" /> <Description>Example Corporation's Finance Organization</Description> <FullName>Finance</FullName> <IsEnabled>false</IsEnabled> <Settings ...> <Link rel="down" href="https://vcloud.example.com/api/admin/org/26/settings/vAppTemplateLeaseSettings" type="application/vnd.vmware.admin.vAppTemplateLeaseSettings+xml" /> <Link rel="down" href="https://vcloud.example.com/api/admin/org/26/settings/email" type="application/vnd.vmware.admin.organizationEmailSettings+xml" /> <Link rel="down" href="https://vcloud.example.com/api/admin/org/26/settings/vAppLeaseSettings" type="application/vnd.vmware.admin.vAppLeaseSettings+xml" /> <Link rel="down" href="https://vcloud.example.com/api/admin/org/26/settings/passwordPolicy" type="application/vnd.vmware.admin.organizationPasswordPolicySettings+xml" /> <Link rel="down" href="https://vcloud.example.com/api/admin/org/26/settings/general" type="application/vnd.vmware.admin.organizationGeneralSettings+xml" /> <Link rel="down" href="https://vcloud.example.com/api/admin/org/26/settings/ldap" type="application/vnd.vmware.admin.organizationLdapSettings+xml" /> <Link rel="down" href="https://vcloud.example.com/api/admin/org/26/settings/guestPersonalizationSettings" type="application/vnd.vmware.admin.guestPersonalizationSettings+xml" /> <Link rel="down" href="https://vcloud.example.com/api/admin/org/26/settings/operationLimitsSettings" type="application/vnd.vmware.admin.operationLimitsSettings+xml" /> <Link rel="down" href="https://vcloud.example.com/api/admin/org/26/settings/federation" type="application/vnd.vmware.admin.organizationFederationSettings+xml" /> <Link rel="down" href="https://vcloud.example.com/api/admin/org/26/settings/oauth" type="application/vnd.vmware.admin.organizationOAuthSettings+xml" /> <Link rel="edit" href="https://vcloud.example.com/api/admin/org/26/settings" type="application/vnd.vmware.admin.orgSettings+xml" /> ... <OrgGeneralSettings> <CanPublishCatalogs>false</CanPublishCatalogs> <CanPublishExternally>true</CanPublishExternally> <CanSubscribe>false</CanSubscribe> <DeployedVMQuota>0</DeployedVMQuota> <StoredVmQuota>0</StoredVmQuota> <UseServerBootSequence>false</UseServerBootSequence> <DelayAfterPowerOnSeconds>0</DelayAfterPowerOnSeconds> ... </OrgGeneralSettings> ... <OrgLdapSettings> <OrgLdapMode>SYSTEM</OrgLdapMode> <CustomUsersOu /> </OrgLdapSettings> <OrgEmailSettings> <IsDefaultSmtpServer>true</IsDefaultSmtpServer> <IsDefaultOrgEmail>true</IsDefaultOrgEmail> <FromEmailAddress /> <DefaultSubjectPrefix /> <IsAlertEmailToAllAdmins>true</IsAlertEmailToAllAdmins> ... </OrgEmailSettings> ... </Settings> <RightReferences ...> ... </RightReferences> <RoleReferences> ... </RoleReferences> </AdminOrg>