5.5

Table Of Contents
Packaged query with sorting and filtering. This query adds parameters and a filter expression to produce a
list of catalogs that contain one or more vApp templates. The query sorts the result set in ascending order by
number of vApp templates:
GET https://vcloud.example.com/api/catalogs/query?
format=records&sortAsc=numberOfTemplates&filter=numberOfTemplates!=0
Response:
<QueryResultRecords
xmlns="http://www.vmware.com/vcloud/v1.5"
total="3"
pageSize="25"
page="1"
name="catalog"
type="application/vnd.vmware.vcloud.query.records+xml"
href="https://vcloud.example.com/api/catalogs/query?
page=1&amp;pageSize=25&amp;format=records&amp;filter=numberOfTemplates!
=0&amp;sortAsc=numberOfTemplates"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ... >
<Link
rel="alternate"
type="application/vnd.vmware.vcloud.query.references+xml"
href="https://vcloud.example.com/api/catalogs/query?
type=catalog&amp;page=1&amp;pageSize=25&amp;format=references&amp;filter=numberOfTemplates!
=0&amp;sortAsc=numberOfTemplates" />
<CatalogRecord
ownerName="system"
organizationName="Engineering"
numberOfTemplates="2"
numberOfMedia="4"
name="TestCatalog"
isShared="true"
isPublished="true"
description="New Catalog"
createdOn="2011-03-22T17:10:10.067-07:00"
href="https://vcloud.example.com/api/catalog/43" />
<CatalogRecord
ownerName="system"
organizationName="Engineering"
numberOfTemplates="8"
numberOfMedia="1"
name="catalog1"
isShared="true"
isPublished="true"
description=""
createdOn="2011-03-22T16:14:06.360-07:00"
href="https://vcloud.example.com/api/catalog/91" />
<CatalogRecord
ownerName="system"
organizationName="VMware"
numberOfTemplates="30"
numberOfMedia="3"
name="VAM"
isShared="true"
isPublished="true"
vCloud API Programming Guide
298 VMware, Inc.