Any request that creates a catalog can also specify a storage profile for the items in that catalog.

If you do not specify a CatalogStorageProfile when creating a catalog, the catalog is created on the default storage profile for the first VDC created in the organization. To create the catalog on a specific storage profile, retrieve the list of available storage profiles in your organization and specify one in the CatalogStorageProfiles element of the request.

This operation requires the rights included in the predefined Catalog Author role or an equivalent set of rights.

Verify that at least one VDC exists in your organization. You cannot create a catalog in an organization that has no VDCs.

1

Find the list of storage profiles in your organization.

Use a query like this one.

https://vcloud.example.com/api/query?type=orgVdcStorageProfile&format=references

The response is a list of references to all the storage profiles used by VDCs in your organization.

<OrgVdcStorageProfileReferences ... >
   <OrgVdcStorageProfileReference
      type="application/vnd.vmware.vcloud.vdcStorageProfile+xml"
      name="*"
      id="urn:vcloud:vdcstorageProfile:59"
      href="https://vcloud.example.com/api/vdcStorageProfile/59" />
   <OrgVdcStorageProfileReference
      type="application/vnd.vmware.vcloud.vdcStorageProfile+xml"
      name="Silver"
      id="urn:vcloud:vdcstorageProfile:84"
      href="https://vcloud.example.com/api/vdcStorageProfile/84" />
</OrgVdcStorageProfileReferences>
Note

If you are a system administrator, you must filter the response to show only those storage profiles in the organization where you are creating the catalog.

2

Create an AdminCatalog element that includes a CatalogStorageProfiles element.

You can include a single CatalogStorageProfile in the request. Only the type and href attributes are required. See the request portion of Example: Specify a Storage Profile for a Catalog.

3

POST the AdminCatalog element to the organization's add URL for catalogs.

See the request portion of Example: Specify a Storage Profile for a Catalog.

The server creates an empty catalog on the specified storage profile and returns its representation in the response. See the response portion of Example: Create a Catalog.

This example modifies the request shown in Example: Create a Catalog to add a CatalogStorageProfiles element..

Request:

POST https://vcloud.example.com/api/admin/org/26/catalogs
Content-Type: application/vnd.vmware.admin.catalog+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<AdminCatalog
   xmlns="http://www.vmware.com/vcloud/v1.5"
   name="Example Catalog">
   <Description>New Catalog for Example Org</Description>
   <CatalogStorageProfiles>
      <VdcStorageProfile
         type="application/vnd.vmware.admin.vdcStorageProfile+xml"
         href="https://vcloud.example.com/api/vdcStorageProfile/59" />
   </CatalogStorageProfiles>
</AdminCatalog>

The response is similar to the one shown in Example: Create a Catalog, and includes a CatalogStorageProfiles element derived form the one that you specified in the request.

Response:

201 Created
Content-Type: application/vnd.vmware.admin.catalog+xml
...
<AdminCatalog
   xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
   name="Example Catalog"
   ...

   <Description>New Catalog for Example Org</Description>
   <CatalogItems/>
   ...
   <CatalogStorageProfiles>
      <VdcStorageProfile
         type="application/vnd.vmware.admin.vdcStorageProfile+xml"
         name="*"
         id="urn:vcloud:vdcstorageProfile:59"
         href="https://vcloud.example.com/api/vdcStorageProfile/59" />
   </CatalogStorageProfiles>
</AdminCatalog>