In addition to the query service, Veeam Backup Enterprise Manager exposes the lookup service via its RESTful API. The lookup service lets the client facilitate search for objects in the virtual infrastructure hierarchy: hosts, VMs, clusters, resource pools, folders and so on.
The lookup service is specifically targeted at retrieving resource representations of virtual infrastructure objects and references to virtual infrastructure objects. Object references are required for some requests that refer to a specific node in the virtual infrastructure hierarchy. For example, if you want to add some VM to the backup job, you need to provide a reference to this VM when sending a request for job editing. Similarly, if you want to assign a restore scope to an account having a specific role in Veeam Backup Enterprise Manager, you need to provide a reference to the VM or VM container to which this account should have access.
The resource representation of the lookup service looks in the following way:
<LookupSvc xmlns="http://www.veeam.com/ent/v1.0" Type="LookupService" Href="https://localhost:9398/api/lookupSvc">
The lookup service resource representation contains a set of links to hierarchy roots — VMware and Hyper-V hosts added to Veeam backup servers that are managed by Veeam Backup Enterprise Manager. By following a link from the resource representation, the client can get a list of VMs that reside on a specific VMware or Hyper-V host. For VMware hosts, the client can also get a list of inventory object tags and storage pods (datastore clusters).
The resource representation of the lookup service provides links to hosts, VMs, tags and storage pods only and may be used for browsing. To obtain a reference to a specific virtual hierarchy object of other type, the client must construct a query string to the lookup service in a specific format.
The reference to the virtual infrastructure object can also be constructed manually. To learn more, see Appendix A. Constructing HierarchyObjRefType.