To create an organization, a system administrator POSTs an AdminOrg element to the cloud’s add URL for orgs.

This operation is restricted to system administrators.

1

Retrieve the XML representation of the cloud.

Use a request like this one.

GET https://vcloud.example.com/api/admin
2

Examine the response to locate the Link element that contains the URL for adding organizations to the cloud.

This element has a rel attribute value of add and a type attribute value of application/vnd.vmware.admin.organization+xml, as shown here:

<Link href="https://vcloud.example.com/api/admin/orgs"
   rel="add"
   type="application/vnd.vmware.admin.organization+xml"/>
3

Create an AdminOrg element that specifies the properties of the organization.

See the request portion of Example: Create an Organization.

4

POST the AdminOrg element you created in Step 3 to the URL described in Step 2.

See the request portion of Example: Create an Organization.

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. vCloud 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 vCloud Director Web console 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 Example: Create an Organization, a user opens a browser and navigates to https://vcloud.example.com/cloud/org/Finance.

This request creates an organization and specifies its required properties. For a list of all required and optional elements that an AdminOrg contains, see the schema reference.

Request:

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.

The response also includes elements inherited from system defaults, such as OrgPasswordPolicySettings, VAppLeaseSettings, and VAppTemplateLeaseSettings. The full content of these elements appears in the actual response. This example shows only a subset.

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"
      type="application/vnd.vmware.admin.catalog+xml"
      href="https://vcloud.example.com/api/admin/org/26/catalogs" />
   <Link
      rel="add"
      type="application/vnd.vmware.admin.user+xml"
      href="https://vcloud.example.com/api/admin/org/26/users" />
   <Link
      rel="add"
      type="application/vnd.vmware.admin.group+xml"
      href="https://vcloud.example.com/api/admin/org/26/groups" />
   <Link
      rel="add"
      type="application/vnd.vmware.admin.vdc+xml"
      href="https://vcloud.example.com/api/admin/org/26/vdcs" />
   <Link
      rel="edit"
      type="application/vnd.vmware.admin.organization+xml"
      href="https://vcloud.example.com/api/admin/org/26" />
   <Link
      rel="remove"
      href="https://vcloud.example.com/api/admin/org/26" />
   <Link
      rel="enable"
      href="https://vcloud.example.com/api/admin/org/26/action/enable" />
   <Link
      rel="alternate"
      type="application/vnd.vmware.vcloud.org+xml"
      href="https://vcloud.example.com/api/org/26" />
   <Description>Example Corporation’s Finance Organization</Description>
   <FullName>Finance</FullName>
   <IsEnabled>false</IsEnabled>
   <Settings
      type="application/vnd.vmware.admin.orgSettings+xml"
      href="https://vcloud.example.com/api/admin/org/26/settings">
      <Link
         rel="down"
         type="application/vnd.vmware.admin.vAppTemplateLeaseSettings+xml"
         href="https://vcloud.example.com/api/admin/org/26/settings/vAppTemplateLeaseSettings" />
      <Link
         rel="down"
         type="application/vnd.vmware.admin.organizationEmailSettings+xml"
         href="https://vcloud.example.com/api/admin/org/26/settings/email" />
      <Link
         rel="down"
         type="application/vnd.vmware.admin.vAppLeaseSettings+xml"
         href="https://vcloud.example.com/api/admin/org/26/settings/vAppLeaseSettings" />
      <Link
         rel="down"
         type="application/vnd.vmware.admin.organizationPasswordPolicySettings+xml"
         href="https://vcloud.example.com/api/admin/org/26/settings/passwordPolicy" />
      <Link
         rel="down"
         type="application/vnd.vmware.admin.organizationGeneralSettings+xml"
         href="https://vcloud.example.com/api/admin/org/26/settings/general" />
      <Link
         rel="down"
         type="application/vnd.vmware.admin.organizationLdapSettings+xml"
         href="https://vcloud.example.com/api/admin/org/26/settings/general/ldap" />
      <Link
         rel="edit"
         type="application/vnd.vmware.admin.orgSettings+xml"
         href="https://vcloud.example.com/api/admin/org/26/settings" />
      <Link
         rel="down"
         type="application/vnd.vmware.admin.operationLimitsSettings+xml"
         href="https://vcloud.example.com/api/admin/org/26/settings/operationLimitsSettings" />
      <Link
         rel="edit"
         type="application/vnd.vmware.admin.orgSettings+xml"
         href="https://vcloud.example.com/api/admin/org/26/settings" />
      <OrgGeneralSettings
         type="application/vnd.vmware.admin.organizationGeneralSettings+xml"
         href="https://vcloud.example.com/api/admin/org/26/settings/general">
         <Link
            rel="edit"
            type="application/vnd.vmware.admin.organizationGeneralSettings+xml"
            href="https://vcloud.example.com/api/admin/org/26/settings/general" />
         <CanPublishCatalogs>false</CanPublishCatalogs>
         <CanPublishExternally>true</CanPublishExternally>
         <CanSubscribe>false</CanSubscribe>
         <DeployedVMQuota>0</DeployedVMQuota>
         <StoredVmQuota>0</StoredVmQuota>
         <UseServerBootSequence>false</UseServerBootSequence>
         <DelayAfterPowerOnSeconds>0</DelayAfterPowerOnSeconds>
      </OrgGeneralSettings>
      <VAppLeaseSettings>
         ...
      </VAppLeaseSettings>
      <VAppTemplateLeaseSettings>
      </VAppTemplateLeaseSettings>
      <OrgLdapSettings>
         ...
      </OrgLdapSettings>
      <OrgEmailSettings>
         ...
      </OrgEmailSettings>
      <OrgPasswordPolicySettings>
         ...
      </OrgPasswordPolicySettings>
      <OrgOperationLimitsSettings>
         ...
      </OrgOperationLimitsSettings>
      <OrgFederationSettings>
         ...
      </OrgFederationSettings>
   </Settings>
</AdminOrg>