1.5
Table Of Contents
- vCloud API Programming Guide
- Contents
- vCloud API Programming Guide
- About the VMware vCloud API
- Hello vCloud: A Simplified RESTful Workflow
- Exploring a Cloud
- Provisioning an Organization with vApps, Templates, and Media
- Deploying and Operating vApps
- Summary of vCloud API vApp and Virtual Machine Operations Requests
- Create a vApp From a Template
- Compose a vApp From Existing Virtual Machines
- Recompose a vApp to Add or Remove Virtual Machines
- Operate a vApp
- Configuring vApps and Virtual Machines
- Retrieve the Configuration Links for a vApp
- Retrieve the Configuration Links for a Virtual Machine
- Retrieve or Update a Modifiable Section
- Update a vApp Network Configuration
- Update the NetworkConnectionSection of a Virtual Machine
- Retrieve or Modify the CPU Configuration of a Virtual Machine
- Retrieve or Modify the GuestCustomizationSection of a Virtual Machine
- Retrieve or Modify ProductSection Elements
- Retrieve or Modify Groups of Related Sections in a Virtual Machine
- Retrieve or Modify the Hard Disk Configuration of a Virtual Machine
- Creating, Provisioning, and Managing Organizations
- Summary of Administrative Requests
- Administrator Credentials and Privileges
- Organization Administration
- Network Administration
- vDC Administration
- Catalog Administration
- User and Group Administration
- Working With Roles and Rights
- Controlling Access to vApps and Catalogs
- Using vCloud API Extensions to Provision and Manage a Cloud
- Working With Object Metadata
- Using the Query Service
- Configuring and Using Blocking Tasks and Notifications
- XML Representations in the vCloud API
- Index
2 Examine the response to find the links to the organization's catalogs.
These links have the following form:
<Link
rel="down"
type="application/vnd.vmware.vcloud.catalog+xml"
href="https://vcloud.example.com/api/catalog/
id
"
name="
catalog_name
" />
3 Retrieve the contents of the catalog.
Use a GET request of the form shown in the request portion of “Example: Retrieving the Contents of a
Catalog,” on page 28.
Example: Retrieving the Contents of a Catalog
This example retrieves the catalog shown in the response portion of “Example: Retrieve the Contents of an
Organization,” on page 26.
Request:
GET https://vcloud.example.com/api/catalog/32
Response:
200 OK
Content-Type: application/vnd.vmware.vcloud.catalog+xml
...
<Catalog
xmlns="http://www.vmware.com/vcloud/v1.5"
name="ExampleCatalog"
type="application/vnd.vmware.vcloud.catalog+xml"
href="https://vcloud.example.com/api/catalog/32">
<Description>Main Org Catalog</Description>
<CatalogItems>
<CatalogItem
type="application/vnd.vmware.vcloud.catalogItem+xml"
name="Ubuntu Template with vsftpd"
href="https://vcloud.example.com/api/catalogItem/221"/>
<CatalogItem ... />
<CatalogItem ... />
</CatalogItems>
</Catalog>
Retrieve a Catalog Item
You can examine the list of items in a catalog to find items of interest based on the values of their name and
type attributes. You must retrieve a catalog item to get a Description and a usable reference to the underlying
object.
Every vApp template or media image that is added to the catalog is represented as a CatalogItem element.
When a client browses a catalog, it can read only the name, type, and href of each CatalogItem. To retrieve an
item from the catalog, the client requires more information. In “Example: Retrieve a Catalog Item,” on
page 29, the client makes a GET request to the URL in the value of the href attribute of a CatalogItem. The
response provides more information, including a description of the referenced object and another URL that
the client can use to retrieve a representation of the object.
vCloud API Programming Guide
28 VMware, Inc.