5.5

Table Of Contents
Example: Create a Catalog With an External Subscription
This request creates a catalog with a subscription to the VCSP URL
https://vcloud2.example.com/vcsp/catalog/5. Because the LocalCopy element in
ExternalCatalogSubscriptionParams has a value of false, files that comprise a vApp template or media
image that a catalog item references are not downloaded until a user requests them. If you create a catalog
where LocalCopy has a value of true, these files are downloaded the first time that the catalog subscription is
synchronized, and on each subsequent synchronization where any of the catalog items has a newer version
number. The default value of LocalCopy isfalse.
Request:
POST https://vcloud.example.com/api/admin/org/26/catalogs
Content-Type: application/vnd.vmware.admin.catalog+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<AdminCatalog
xmlns="http://www.vmware.com/vcloud/v1.5"
name="SubscribedExternally">
<Description>Example Catalog With External Subscription</Description>
<ExternalCatalogSubscriptionParams>
<SubscribeToExternalFeeds>true</SubscribeToExternalFeeds>
<Location>https://vcloud2.example.com/vcsp/catalog/5</Location>
<Password>Pa55w0rd</Password>
<LocalCopy>false</LocalCopy>
</ExternalCatalogSubscriptionParams>
</AdminCatalog>
The response is similar to the one shown in “Example: Create a Catalog,” on page 199, but includes the
ExternalCatalogSubscriptionParams element that you supplied in the request. The Password element in the
request is never returned.
Response:
201 Created
Content-Type: application/vnd.vmware.admin.catalog+xml
...
<AdminCatalog
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
name="SubscribedExternally"
id="urn:vcloud:catalog:34"
type="application/vnd.vmware.admin.catalog+xml"
href="https://vcloud.example.com/api/admin/catalog/34">
...
<Link
rel="up"
type="application/vnd.vmware.admin.organization+xml"
href="https://vcloud.example.com/api/admin/org/26" />
<Link ... >
<Link
rel="sync"
href="https://vcloud.example.com/api/catalog/34/action/sync"/>
<Link ... >
...
<Tasks>
<Task
status="running"
...
vCloud API Programming Guide
204 VMware, Inc.