When To Use Data
Service Queries
The Data Service
is primarily intended for queries from user interface components. However, your
service providers also have access to the Data Service.
You can initiate Data Service
queries in the Java code of your service providers to fetch data from vCenter
Server or from custom service providers. A best practice is to use the vSphere
Web Services API to fetch data from vCenter Server, because it is more
efficient than Data Services. However, you must use Data Services in the
following cases:
- You need to join data from more than one vCenter Server.
- Your query includes properties that are available only from a custom provider.
- Your query includes data objects (complex properties) from vCenter Server, and the client is a UI component from VMware that understands data object encoding.