5.5

Table Of Contents
2 Retrieve or update the value.
Make a request to the URL in the value of the href attribute of the MetadataEntry that contains the Key.
n
To retrieve the value, make a GET request to URL in the value of the href attribute of the
MetadataEntry. The response is a MetadataValue element.
n
To update the value, make a PUT request to the URL in the edit link described in Step 1, and
supply a MetadataValue element as the request body. See .“Example: Update a Metadata Value,” on
page 287
NOTE The href value of a MetadataEntry in the SYSTEM domain includes the SYSTEM qualifier. The href
value of a MetadataEntry in the GENERAL domain does not include a qualifier.
Example: Update a Metadata Value
This request updates the value of the metadata Key named LOS from the original value of bronze (shown in
“Example: Update a Metadata Element,” on page 284) to a new value of silver. Note that because this
MetadataValue is contained by a MetadataEntry where the Domain is SYSTEM and visibility is PRIVATE, only a
system administrator can update it.
Request:
PUT https://vcloud.example.com/api/admin/org/26/metadata/SYSTEM/LOS
Content-Type: application/vnd.vmware.vcloud.metadata.value+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<MetadataValue
xmlns="http://www.vmware.com/vcloud/v1.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<TypedValue
xsi:type="MetadataStringValue">
<Value>silver</Value>
</TypedValue>
</MetadataValue>
The response is a task.
Response:
<Task
...
operation="Updating metadata for Organization (26)"
... >
...
</Task>
Chapter 8 Working With Object Metadata
VMware, Inc. 287