VMware Cloud Director API - POST-CreateCatalogItem

VMware Cloud Director API - POST-CreateCatalogItem

POST /catalog/{id}/catalogItems

Operation:
POST /catalog/{id}/catalogItems
Description:
Add an item to a catalog.
Since:
0.9
Input parameters
Consume media type(s):
application/vnd.vmware.vcloud.catalogItem+xml
application/vnd.vmware.vcloud.catalogItem+json
Input type:
CatalogItemType
Output parameters
CatalogItemType

Produce media type(s):
application/vnd.vmware.vcloud.catalogItem+xml
application/vnd.vmware.vcloud.catalogItem+json
Output type:
CatalogItemType
Examples
Request
HTTP 1.1
POST /api/catalog/39867ab4-04e0-4b13-b468-08abcc1de810/catalogItems

Headers:
Content-Length: 507
Content-Type: application/vnd.vmware.vcloud.catalogItem+xml; charset=ISO-8859-1
x-vcloud-authorization: iIkyZzr07kqm/lMWdPGyA4xBD9ys0teo/Yo0F6NXHbo=

Body:
<?xml version="1.0" encoding="UTF-8"?><vcloud:CatalogItem
    xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    name="CatalogName">
    <vcloud:Description>Catalog Description</vcloud:Description>
    <vcloud:Entity
        href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-b839171b-0272-4c3e-8910-fe3d421e35de"
        name="ClonedVAppTempl"
        type="application/vnd.vmware.vcloud.vAppTemplate+xml"
        xsi:type="vcloud:ResourceReferenceType"/>
</vcloud:CatalogItem>
Response
HTTP/1.1 201 Created

Headers:
Content-Length: 1246
Content-Type: application/vnd.vmware.vcloud.catalogitem+xml;version=5.5
Location: https://vcloud.example.com/api/catalogItem/a28070bb-6592-4738-9625-6da3a3e1afa4
Vary: Accept-Encoding

Body:
<?xml version="1.0" encoding="UTF-8"?><CatalogItem
    xmlns="http://www.vmware.com/vcloud/v1.5"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    href="https://vcloud.example.com/api/catalogItem/a28070bb-6592-4738-9625-6da3a3e1afa4"
    id="urn:vcloud:catalogitem:a28070bb-6592-4738-9625-6da3a3e1afa4"
    name="CatalogName"
    type="application/vnd.vmware.vcloud.catalogItem+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/catalog/39867ab4-04e0-4b13-b468-08abcc1de810"
        rel="up"
        type="application/vnd.vmware.vcloud.catalog+xml"/>
    <Link
        href="https://vcloud.example.com/api/catalogItem/a28070bb-6592-4738-9625-6da3a3e1afa4/metadata"
        rel="down"
        type="application/vnd.vmware.vcloud.metadata+xml"/>
    <Link
        href="https://vcloud.example.com/api/catalogItem/a28070bb-6592-4738-9625-6da3a3e1afa4"
        rel="edit"
        type="application/vnd.vmware.vcloud.catalogItem+xml"/>
    <Description>Catalog Description</Description>
    <Entity
        href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-b839171b-0272-4c3e-8910-fe3d421e35de"
        name="CatalogName"
        type="application/vnd.vmware.vcloud.vAppTemplate+xml"/>
    <VersionNumber>0</VersionNumber>
</CatalogItem>