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 Retrieve a Catalog Item, 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.

Prerequisites

This operation requires the rights included in the predefined vApp Author role or an equivalent set of rights.

Procedure

  1. Retrieve the representation of a catalog in your organization.
    Use a request like this one:
    GET https://vcloud.example.com/api/catalog/32
  2. Examine the response to find the CatalogItem elements that the catalog contains.
    The value of the name attribute of a CatalogItem element is taken from the name attribute of the referenced object. You can use it as a preliminary indicator of what the item represents.
  3. Retrieve a CatalogItem.
    Use a GET request of the form shown in the request portion of Retrieve a Catalog Item.

Example: Retrieve a Catalog Item

This example retrieves the CatalogItem shown in the response portion of Retrieve the Contents of a Catalog.

Request:
GET https://vcloud.example.com/api/catalogItem/221

In addition to the name attribute and Description element, the CatalogItem contains a rel="up" link to the catalog that contains it, and other links that you can use to manage the CatalogItem.

Response:
200 OK
Content-Type: application/vnd.vmware.vcloud.catalogItem+xml
...
<CatalogItem
   xmlns="http://www.vmware.com/vcloud/v1.5"
   name="Ubuntu Template with vsftpd"
   id="urn:vcloud:catalogitem:221"
   href="https://vcloud.example.com/api/catalogItem/221" ... >
  <Link
      rel="up"
      type="application/vnd.vmware.vcloud.catalog+xml"
      href="https://vcloud.example.com/api/catalog/32" />
   <Link
      rel="down"
      type="application/vnd.vmware.vcloud.metadata+xml"
      href="https://vcloud.example.com/api/catalogItem/221/metadata" />
   <Link
      rel="edit"
      type="application/vnd.vmware.vcloud.catalogItem+xml"
      href="https://vcloud.example.com/api/catalogItem/221" />
   <Link
      rel="remove"
      href="https://vcloud.example.com/api/catalogItem/221" />
   <Description>Approved template for public FTP sites</Description>
   <Entity
      href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-111"
      type="application/vnd.vmware.vcloud.vAppTemplate+xml"
      name="Ubuntu Template with vsftpd"/>
</CatalogItem>