5.5

Table Of Contents
Procedure
1 Retrieve the list of organization settings elements.
Use a request like this one:
GET https://vcloud.example.com/api/admin/org/26/settings
The response is an OrgSettings element.
2 Examine the OrgSettings element to find the links to the sections to view or modify.
Each section is represented in the OrgSettings element with a link where rel="down". You can use that
link to retrieve the section. The retrieved section includes a link where rel="edit". You can use that link
as the target of a PUT request that modifies the settings that the element represents. The OrgSettings
element itself also has a rel="edit" link, which you can use to update multiple settings sections in one
request.
3 Retrieve the settings element to modify.
Make a GET request to the URL in the element's href attribute value.
4 Modify the retrieved settings element.
Modified sections must contain all required elements, even if you are not changing their values.
Because optional elements revert to default values if they are omitted or empty, it is a best practice to
include optional elements in updates. Link elements and href attributes from responses do not need to
be included in modified sections. Some elements and attributes might be read-only. See the schema
reference for details.
5 Update the settings with your modifications.
Find the Link element in the settings element where rel="edit". Make a PUT request to the URL in that
link's href attribute value, and supply the modified section as the request body. See the request portion
of “Example: Update Organization General Settings,” on page 158.
Example: Update Organization General Settings
This example updates the general settings of the organization created in “Example: Create an Organization,”
on page 153. When you create or retrieve an AdminOrg, these settings are contained in the
OrgGeneralSettings element. To update them, you must use a GeneralOrgSettings element, which has the
same contents as OrgGeneralSettings. This update changes the limits on deployed and stored virtual
machines. The request includes all members of the GeneralOrgSettings element, even those that are not
changing. It is a best practice to include all members of the GeneralOrgSettings element in an update
request. Optional elements that are missing or empty in the request are reset to their default values.
Request:
PUT https://vcloud.example.com/api/admin/org/26/settings/general
Content-Type: application/vnd.vmware.admin.organizationGeneralSettings+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<GeneralOrgSettings
xmlns="http://www.vmware.com/vcloud/v1.5"
type="application/vnd.vmware.admin.organizationGeneralSettings+xml">
<CanPublishCatalogs>false</CanPublishCatalogs>
<CanPublishExternally>true</CanPublishExternally>
<CanSubscribe>false</CanSubscribe>
<DeployedVMQuota>10</DeployedVMQuota>
vCloud API Programming Guide
158 VMware, Inc.