A system administrator can share a catalog to make it visible to the administrators of specific organizations in a cloud.

The owner of a catalog can share it to make it available to all organizations in the cloud. When more selective sharing is required, a system administrator can share a catalog with specific organizations if that catalog is not already shared to all organizations.

Note: Starting with VMware Cloud Director API version 39.0, /api/catalog/id/controlAccess returns OpenAPI href attribute values for subject in the responses. The POST request payload accepts either legacy href or OpenAPI href.

Prerequisites

Verify that you are logged in as a system administrator.

Procedure

  1. Retrieve the XML representation of the catalog.
    Use a request like this one:
    GET https://vcloud.example.com/api/catalog/id
  2. Examine the Catalog response to find the controlAccess links that it contains.
    These links have the following form:
    <Link
       rel="down"
       type="application/vnd.vmware.vcloud.controlAccess+xml"
       href="https://vcloud.example.com/api/catalog/id/controlAccess/"/>
    <Link
       rel="controlAccess"
       type="application/vnd.vmware.vcloud.controlAccess+xml"
       href="https://vcloud.example.com/api/catalog/id/action/controlAccess/"/>
  3. Create a ControlAccessParams element request body that specifies the details of the update.
  4. POST the ControlAccessParams element to the action/controlAccess link for the catalog.

Results

The catalog is shared with administrators of the specified organizations.

Example: Share a Catalog With Specific Organizations in a Cloud

This request updates the access controls of a catalog to share it to a single organization, giving read-only access to all users in that organization.

Request:
POST https://vcloud.example.com/api/catalog/32/action/controlAccess/"/>
Content-Type: application/vnd.vmware.vcloud.controlAccess+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<ControlAccessParams
   xmlns="http://www.vmware.com/vcloud/v1.5">
   <IsSharedToEveryone>false</IsSharedToEveryone>
   <AccessSettings>
       <AccessSetting>
         <Subject
            type="application/vnd.vmware.admin.organization+xml"
            href="https://vcloud.example.com/api/admin/org/355"/>
         <AccessLevel>ReadOnly</AccessLevel>
      </AccessSetting>
   </AccessSettings>
</ControlAccessParams>
Response:
200 OK
Content-Type: application/vnd.vmware.vcloud.controlAccess+xml
...
<ControlAccessParams
   xmlns="http://www.vmware.com/vcloud/v1.5">
   <IsSharedToEveryone>false</IsSharedToEveryone>
   <AccessSettings>
       <AccessSetting>
         <Subject
            type="application/vnd.vmware.admin.organization+xml"
            href=“https://vcloud.example.com/cloudapi/1.0.0/orgs/355”/>
         <AccessLevel>ReadOnly</AccessLevel>
      </AccessSetting>
   </AccessSettings>
</ControlAccessParams>