Getting virtualized system instances with tag view¶
Get information about instances that are managed by a specific virtualized system, such as vCenter Server and Hyper-V Server, with the tag view filter.
Method and URI¶
To get information about all virtualized systems with the tag view filter, use a GET method and a URI:
GET https://{hostname|IP}/api/hypervisor/{hypervisorHypervisorId}/tagcontent
Tip
To get a {hypervisorHypervisorId}
by hostname/IP, follow the instructions in Getting a {hypervisorHypervisorId}.
Data¶
None.
Example: Get information about virtualize system instances by using the tag view¶
Assume that you added VMware vCenter Server: VMware - Dallas 1 ({hypervisorHypervisorId}
1001). The Python script snippet below will give you a list of instances:
hypervisor_hypervisor_id = "1001" # VMware - Dallas
_params = {"from": "hlo"}
requests.get('https://' + spp_ipv4 + '/api/hypervisor/'
+ hypervisor_hypervisor_id + '/tagcontent',
headers={...}, params=_params, data="", verify=...)
The resposnse below with the HTTP status of 200 (OK) shows the list of all the virtualized systems.
{
"links": {...},
"total": 2,
"contents": [
{
"links": {...},
"name": "All",
"type": "tagcategory",
"association": null,
"protectionInfo": null,
"recoveryInfo": null,
"recoveryPoint": null,
"siteId": null,
"autoProvisionedsubPolicyName": null,
"rbacPath": "root:0/hypervisor.all:0/hypervisor.type:vmware/hypervis
↪or:1001/vtagcategory:512150d081814f93e4deb6055d66bcf4",
"rbacPathId": 2,
"extInfo": null,
"location": "/DALLAS.BLUEMACHINES.com.invalid",
"metadataPath": "/MS:1001/TAGCATEGORY:512150d081814f93e4deb6055d66bc
↪f4",
"inHLO": true,
"hypervisorType": "vmware",
"hypervisorKey": "1001",
"hypervisorManagementServerID": "1001",
"nativeKey": "urn:vmomi:InventoryServiceCategory:24b74365-f672-4aac-
↪8862-0f733c5cf9de:GLOBAL",
"cloudType": null,
"tags": null,
"tagCategories": null,
"metadataPathVmHost": null,
"rbacPathVmHost": null,
"rbacPathIdVmHost": null,
"alternatePaths": null,
"description": "",
"cardinality": "MULTIPLE",
"associableTypes": [],
"nativeObject": {},
"hypervisorHostKey": null,
"windows": false,
"volumeId": null,
"linux": false,
"volumes": [],
"protected": false,
"systemHold": false,
"id": "512150d081814f93e4deb6055d66bcf4",
"resourceType": "tagcategory",
"storageProfiles": []
}
]
}