You can make a GET request to a catalog URL to retrieve a list of vApp templates and media images referenced by the catalog.
To use a vApp template or media image listed in a catalog, retrieve the catalog to discover the set of CatalogItem elements it contains, then make an additional request to retrieve the CatalogItem of interest.
This operation requires the rights included in the predefined vApp Author role or an equivalent set of rights.
1 | Retrieve the XML representation of your organization. GET https://vcloud.example.com/api/org/5 |
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: Retrieve the Contents of a Catalog. |
This example retrieves the catalog shown in the response portion of Example: Retrieve the Contents of an Organization.
GET https://vcloud.example.com/api/catalog/32
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>