5.1
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
- Summary of vCloud API Browsing Requests
- Retrieve the Login URL and List of Supported API Versions
- Create a Login Session Using the Integrated Identity Provider
- Retrieve a List of Organizations Accessible to You
- Retrieve an Administrative View of a Cloud
- Retrieve a List of vSphere Platform Operations and Objects for a Cloud
- Provisioning an Organization
- Summary of vCloud API Provisioning Requests
- Upload an OVF Package to Create a vApp Template
- Download a vApp Template as OVF
- Upload a Media Image
- Copying and Moving with the vCloud API
- Capturing and Importing vApps
- Cataloging vApp Templates and Media Images
- Creating and Using Independent Disks
- View or Change the Owner of an Object
- 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
- Provide User Input Requested by a Virtual Machine
- Attach or Detach an Independent Disk
- Creating and Using vApp Snapshots
- Operate a vApp
- Configuring vApps and Virtual Machines
- Retrieve the Configuration Links for a vApp
- Retrieve the Configuration Links for a Virtual Machine
- Update Multiple Sections of 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
- Update the Storage Profile for a Virtual Machine
- Creating and Managing Organizations
- Summary of Administrative Requests
- Administrator Credentials and Privileges
- Organization Administration
- vDC Administration
- Network Administration
- Catalog Administration
- User and Group Administration
- Working With Roles and Rights
- Controlling Access to vApps and Catalogs
- Managing and Monitoring a Cloud
- Summary of vSphere Platform Extension Requests
- Retrieve or Update System Settings
- Attach a vCenter Server
- Finding Available vCenter Resources
- Create a Provider vDC
- Create an External Network
- Create a Network Pool
- Import a Virtual Machine from vCenter
- Relocate a Virtual Machine to a Different Datastore
- Truststore and Keytab Maintenance
- Retrieve the vSphere URL of an Object
- Working With Object Metadata
- Using the Query Service
- Configuring and Using Blocking Tasks and Notifications
- vCloud Director Extension Services
- XML Representations in the vCloud API
- Index
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 made. 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 257.
Table 9-1. 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
API-URL/vms/query All virtual machines that you can view or modify
API-URL/admin/groups/query Groups in all organizations in the system
API-URL/admin/users/query Users in all organizations in the system
API-URL/admin/strandedUsers/query Stranded users in the organization. When you delete an
LDAP group, users who were imported from that group
become stranded and cannot log in.
API-URL/admin/roles/query All roles defined in the system
API-URL/admin/rights/query All rights defined in the system
API-URL/admin/orgs/query All organizations visible to you
API-URL/admin/vdcs/query All vDCs in the system
API-URL/admin/extension/hostReferences/query ESX/ESXi hosts registered to the system
API-URL/admin/extension/datastores/query All datastores in the system
API-
URL/admin/extension/externalNetworkReferences/query
External networks in the system
API-URL/admin/extension/networkPoolReferences/query All network pools in the system
API-URL/admin/extension/providerVdcReferences/query All provider vDCs in the system
API-URL/admin/extension/vimServerReferences/query All vCenter servers registered to the system
API-URL/admin/extension/orgNetworks/query All organization networks in the system
API-URL/admin/extension/vapps/query All vApps in the system
API-URL/admin/extension/orgVdcs/query All vDCs in the system
Examples
Simple packaged query using the records format, which is the default.
GET https://vcloud.example.com/api/catalogs/query
Response:
<QueryResultRecords
xmlns="http://www.vmware.com/vcloud/v1.5"
total="15"
pageSize="25"
page="1"
name="catalog"
Chapter 9 Using the Query Service
VMware, Inc. 253