Some requests in Veeam Backup Enterprise Manager RESTful API require the client to provide a reference to the virtual infrastructure object, or HierarchyObjRefType.
The HierarchyObjRefType object describes a specific node in the virtual infrastructure hierarchy. This object must be constructed for requests that refer to some node or level in the virtual infrastructure hierarchy, for example, a request editing a job or assigning a restore scope to the account in Veeam Backup Enterprise Manager.
The HierarchyObjRefType object is constructed as a string that has the following pattern:
- Platform is the platform on which the virtual infrastructure object is created: VMware, Hyperv or vCloud
- Type is the object type. In the VMware virtual environment, the HierarchyObjRefType can represent an object of the following types:
In vCloud Director, the HierarchyObjRefType can represent an object of the following types:
In the Hyper-V virtual environment, the HierarchyObjRefType can represent an object of the following types:
- HierarchyRootID is an ID of the host on which the virtual infrastructure object resides. The HierarchyRootID can be obtained using the /hierarchyRoots resource.
- ObjectRef is an ID of the virtual infrastructure object itself: mo-ref or ID, depending on the virtualization platform.
For example, you need to configure the HierarchyObjRefType string for the VM. The VM is described with the following settings:
- Platform: VMware
- Type: VM
- HierarchyRootID: vcprod.veeam.local having ID a2b0c55d-829a-4efe-bd95-125ee77ba9dd
- Mo-ref: vm-7870
The HierarchyObjRefType string will then look in the following way:
In addition to configuring the HierarchyObjRefType string manually, you can get the HierarchyObjRefType string for the necessary object in the virtual infrastructure hierarchy using the /lookupSvc resource.