POST /admin/extension/vimServer/{id}/importVmAsVApp

Operation:
POST /admin/extension/vimServer/{id}/importVmAsVApp
Description:
Import a virtual machine from vCenter as a vCloud Director vApp.
Since:
1.0
Input parameters
Consume media type(s):
application/vnd.vmware.admin.importVmAsVAppParams+xml
application/vnd.vmware.admin.importVmAsVAppParams+json
Input type:
ImportVmAsVAppParamsType
Output parameters
VAppType

This operation is asynchronous. The response contains an embedded task object that you can monitor to track the progress of the request.

Produce media type(s):
application/vnd.vmware.vcloud.vApp+xml
application/vnd.vmware.vcloud.vApp+json
Output type:
VAppType
Examples
Request
HTTP 1.1
POST /api/admin/extension/vimServer/3691f5d6-32eb-44f6-804a-1d30d17068c3/importVmAsVApp

Headers:
Content-Length: 393
Content-Type: application/vnd.vmware.admin.importVmAsVAppParams+xml; charset=ISO-8859-1
x-vcloud-authorization: X600Twh81GezzqBm3B3GXTe8r9U8+U5kIrA3X4H2ctE=

Body:
<?xml version="1.0" encoding="UTF-8"?><vmext:ImportVmAsVAppParams
    xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
    name="ImportedVmAsVapp"
    sourceMove="false">
    <vmext:ComputerName>vAppCompName</vmext:ComputerName>
    <vmext:VmMoRef>vm-72</vmext:VmMoRef>
    <vmext:Vdc
        href="https://vcloud.example.com/api/vdc/afaafb99-228c-4838-ad07-5bf3aa649d42"/>
</vmext:ImportVmAsVAppParams>
Response
HTTP/1.1 201 Created

Headers:
Content-Length: 3241
Content-Type: application/vnd.vmware.vcloud.vapp+xml;version=5.1
Location: https://vcloud.example.com/api/vApp/vapp-bc705bf4-11b9-4cfc-b4e5-11e3cdf7a232
Vary: Accept-Encoding

Body:
<?xml version="1.0" encoding="UTF-8"?><VApp
    xmlns="http://www.vmware.com/vcloud/v1.5"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    deployed="false"
    href="https://vcloud.example.com/api/vApp/vapp-bc705bf4-11b9-4cfc-b4e5-11e3cdf7a232"
    id="urn:vcloud:vapp:bc705bf4-11b9-4cfc-b4e5-11e3cdf7a232"
    name="ImportedVmAsVapp"
    ovfDescriptorUploaded="true"
    status="0"
    type="application/vnd.vmware.vcloud.vApp+xml"
    xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://https://vcloud.example.com/api/v1.5/schema/master.xsd">
    <Link
        href="https://vcloud.example.com/api/network/bc279a0f-db9e-47a0-b4f4-a0e22c93905e"
        name="AutomationVMPort1"
        rel="down"
        type="application/vnd.vmware.vcloud.vAppNetwork+xml"/>
    <Link
        href="https://vcloud.example.com/api/vApp/vapp-bc705bf4-11b9-4cfc-b4e5-11e3cdf7a232/controlAccess/"
        rel="down"
        type="application/vnd.vmware.vcloud.controlAccess+xml"/>
    <Link
        href="https://vcloud.example.com/api/vdc/afaafb99-228c-4838-ad07-5bf3aa649d42"
        rel="up"
        type="application/vnd.vmware.vcloud.vdc+xml"/>
    <Link
        href="https://vcloud.example.com/api/vApp/vapp-bc705bf4-11b9-4cfc-b4e5-11e3cdf7a232/owner"
        rel="down"
        type="application/vnd.vmware.vcloud.owner+xml"/>
    <Link
        href="https://vcloud.example.com/api/vApp/vapp-bc705bf4-11b9-4cfc-b4e5-11e3cdf7a232/metadata"
        rel="down"
        type="application/vnd.vmware.vcloud.metadata+xml"/>
    <Link
        href="https://vcloud.example.com/api/vApp/vapp-bc705bf4-11b9-4cfc-b4e5-11e3cdf7a232/ovf"
        rel="ovf"
        type="text/xml"/>
    <Link
        href="https://vcloud.example.com/api/vApp/vapp-bc705bf4-11b9-4cfc-b4e5-11e3cdf7a232/productSections/"
        rel="down"
        type="application/vnd.vmware.vcloud.productSections+xml"/>
    <Tasks>
        <Task
            cancelRequested="false"
            expiryTime="2013-05-13T16:54:34.813+03:00"
            href="https://vcloud.example.com/api/task/46b22efd-5c22-4c45-a3d8-9a848adc7352"
            id="urn:vcloud:task:46b22efd-5c22-4c45-a3d8-9a848adc7352"
            name="task"
            operation="Importing Virtual Application ImportedVmAsVapp(bc705bf4-11b9-4cfc-b4e5-11e3cdf7a232)"
            operationName="importSingletonVapp"
            serviceNamespace="com.vmware.vcloud"
            startTime="2013-02-12T16:54:34.813+02:00"
            status="running"
            type="application/vnd.vmware.vcloud.task+xml">
            <Link
                href="https://vcloud.example.com/api/task/46b22efd-5c22-4c45-a3d8-9a848adc7352/action/cancel"
                rel="task:cancel"/>
            <Owner
                href="https://vcloud.example.com/api/vApp/vapp-bc705bf4-11b9-4cfc-b4e5-11e3cdf7a232"
                name="ImportedVmAsVapp"
                type="application/vnd.vmware.vcloud.vApp+xml"/>
            <User
                href="https://vcloud.example.com/api/admin/user/1260efee-6915-494c-8afa-84e7e6d8a310"
                name="system"
                type="application/vnd.vmware.admin.user+xml"/>
            <Organization
                href="https://vcloud.example.com/api/org/7b832bc5-3d65-45a2-8d35-da28388ab80a"
                name="Default"
                type="application/vnd.vmware.vcloud.org+xml"/>
            <Progress>1</Progress>
            <Details/>
        </Task>
    </Tasks>
    <DateCreated>2013-02-12T16:54:30.546+02:00</DateCreated>
    <Owner
        type="application/vnd.vmware.vcloud.owner+xml">
        <User
            href="https://vcloud.example.com/api/admin/user/51e86769-9e2d-4edc-af4e-5d3606494cbf"
            name="system"
            type="application/vnd.vmware.admin.user+xml"/>
    </Owner>
    <InMaintenanceMode>false</InMaintenanceMode>
</VApp>