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
name="bob"
href="https://vcloud.example.com/api/admin/user/39" />
<UserReference
type="application/vnd.vmware.admin.user+xml"
name="zorro"
href="https://vcloud.example.com/api/admin/user/58" />
</UserReferences>
Packaged Queries
Packaged queries have well-known URLs and can accept most of the parameters used with typed queries.
Query Syntax
Packaged queries have the following syntax:
API-URL
/
query-url
[?
param
][&
param
... ][&
filter
]
n
API-URL is a URL of the form https://vcloud.example.com/api.
n
query-url is the packaged query URL.
n
param is an optional query parameter. Zero or more parameters are allowed. See “Query Parameters,” on
page 211.
n
filter is an optional filter expression. At most one filter expression is allowed. See “Filter Expressions,” on
page 212.
Query Categories
Packaged queries are divided into the following categories:
User queries
The queries have the form API-URL/object-type/query. Any user can run these
queries.
Administrator queries
The queries have the form API-URL/admin/object-type/query. An organization
administrator can run these queries.
Extension queries
The queries have the form API-URL/admin/extension/object-type/query. A
system administrator can run these queries.
If you make a query whose result set you do not have rights to view, a response code of
ACCESS_TO_RESOURCE_IS_FORBIDDEN (403) is returned.
Each query type returns its result set as an XML document in which objects are represented as elements and
object properties are represented as attributes, pairing the name of the property with its value at the time the
request was run. By default, result sets are returned in the records format, which shows all database records
for each object. Most queries also support the references format, which returns a set of object references,
including name, type, and href attributes. All queries that support the records format also support the
idrecords format. For more information about the format parameter, see “Query Parameters,” on page 211.
Table 9-2. Packaged Queries
Query URL Result Set
API-URL/catalogs/query All catalogs in your organization that you have rights to view
or modify
API-URL/mediaList/query All media that you can view or modify
API-URL/vAppTemplates/query All vApp templates that you can view or modify
API-URL/vApps/query All vApps that you can view or modify
Chapter 9 Using the Query Service
VMware, Inc. 207