VMware Cloud Director API - POST-UpdateVAppTemplateMetadata

VMware Cloud Director API - POST-UpdateVAppTemplateMetadata

POST /vAppTemplate/{id}/metadata

Operation:
POST /vAppTemplate/{id}/metadata
Description:
Merge the metadata provided in the request with existing metadata.
Since:
1.5
Input parameters
Consume media type(s):
application/vnd.vmware.vcloud.metadata+xml
application/vnd.vmware.vcloud.metadata+json
Input type:
MetadataType
Output parameters
Produce media type(s):
application/vnd.vmware.vcloud.task+xml
application/vnd.vmware.vcloud.task+json
Output type:
TaskType
Examples
Request
HTTP 1.1
POST /api/vAppTemplate/vappTemplate-33637be1-bce6-46dc-bdba-54d85c8a64bc/metadata

Headers:
x-vcloud-authorization: Trd4ej5eoYxREBXVUEBjhNsEAAdbkoG4fLCDBrCBQXY=

Body:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns6:Metadata
    xmlns="http://www.vmware.com/vcloud/versions" xmlns:ns2="http://schemas.dmtf.org/ovf/envelope/1" xmlns:ns3="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:ns4="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:ns5="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:ns6="http://www.vmware.com/vcloud/v1.5" xmlns:ns7="http://www.vmware.com/schema/ovf" xmlns:ns8="http://schemas.dmtf.org/ovf/environment/1" xmlns:ns9="http://www.vmware.com/vcloud/extension/v1.5">
    <ns6:MetadataEntry
        type="string">
        <ns6:Domain
            visibility="PRIVATE">SYSTEM</ns6:Domain>
        <ns6:Key>testKey</ns6:Key>
        <ns6:TypedValue
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:type="ns6:MetadataStringValue">
            <ns6:Value>testValue</ns6:Value>
        </ns6:TypedValue>
    </ns6:MetadataEntry>
</ns6:Metadata>
Response
HTTP/1.1 202 Accepted

Headers:
Content-Length: 1345
Content-Type: application/vnd.vmware.vcloud.task+xml; version=5.5
Location: https://vcloud.example.com/api/task/93975f3a-bf39-4112-9d05-259a8bcb04ac
Vary: Accept-Encoding

Body:
<?xml version="1.0" encoding="UTF-8"?>
<Task
    xmlns="http://www.vmware.com/vcloud/v1.5"
    status="running"
    startTime="2013-03-26T13:42:05.892+02:00"
    serviceNamespace="com.vmware.vcloud"
    operationName="metadataUpdate"
    operation="Updating metadata for Virtual Application Template (33637be1-bce6-46dc-bdba-54d85c8a64bc)"
    expiryTime="2013-06-24T13:42:05.892+03:00"
    cancelRequested="false"
    name="task"
    id="urn:vcloud:task:93975f3a-bf39-4112-9d05-259a8bcb04ac"
    type="application/vnd.vmware.vcloud.task+xml"
    href="https://vcloud.example.com/api/task/93975f3a-bf39-4112-9d05-259a8bcb04ac"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://vcloud.example.com/api/v1.5/schema/master.xsd">
    <Link
        rel="task:cancel"
        href="https://vcloud.example.com/api/task/93975f3a-bf39-4112-9d05-259a8bcb04ac/action/cancel"/>
    <Owner
        type="application/vnd.vmware.vcloud.vAppTemplate+xml"
        name=""
        href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-33637be1-bce6-46dc-bdba-54d85c8a64bc"/>
    <User
        type="application/vnd.vmware.admin.user+xml"
        name="system"
        href="https://vcloud.example.com/api/admin/user/4b36181e-b32d-456e-ad94-8e0a568b1346"/>
    <Organization
        type="application/vnd.vmware.vcloud.org+xml"
        name="Default"
        href="https://vcloud.example.com/api/org/710affad-0212-4e55-b6ae-4818d6e9166e"/>
    <Details/>
</Task>