Getting information about virtualized systems¶
Get virtualized systems including vCenter Servers, Microsoft Hyper-V Servers and Amazon EC2. The REST API can request a list of virtualized systems of all types unlike the web user interface where you can only see one type of them.

Figure 21 An equivalent action on a web browser for vCenter Servers.¶
Method and URI¶
To get information about all virtualized systems, use a GET method and a URI:
GET https://{hostname|IP}/api/hypervisor
To get information about all virtualized systems, use a GET method and a URI:
GET https://{hostname|IP}/api/hypervisor/{hypervisorHypervisorId}
Tip
To get a {hypervisorHypervisorId}
value based on its name, follow the instructions in Getting a {hypervisorHypervisorId}.
Parameters¶
Parameter 1: filter
Optionally, you may use the filter to specify a type of virtualized systems. You can use the filter
operation parameters that are described in Filter. If you do not use this parameter, you will get all types of virtualized systems.
Example value: Use the following value for the
filter
key to get objects that are managed by VMware vCenter:
{
[
{
"property": "type",
"value": "vmware",
"op": "="
}
]
}
Type: JSON object. Available in the web user interface.
Data¶
None.
Example 1: Get information about all virtualized systems¶
A Python snippet that is similar to the following example can be used to get a list of all virtualized systems:
requests.get('https://' + spp_ipv4 + '/api/hypervisor',
headers={...}, verify=...)
The resposnse below with the HTTP status of 200 (OK) shows the list of all virtualized systems.
{
"links": {...},
"total": 5,
"hypervisors": [
{
"links": {...},
"name": "10.0.0.10",
"hostAddress": "10.0.0.10",
"user": {
"href": "https://10.0.0.100:-1/api/identity/user/2102"
},
"sslConnection": true,
"portNumber": 443,
"type": "vmware",
"id": "1001",
"uniqueId": "fa8f1a0f-9d01-44e6-b281-6c577cd920ae",
"version": null,
"build": null,
"apiVersion": null,
"properties": {},
"logicalDelete": false,
"opProperties": {
"snapshotConcurrency": 3,
"veServerInfo": null
},
"rbacPath": "root:0/hypervisor.all:0/hypervisor.type:vmware/hypervis
↪or:1001",
"resourceType": "hypervisor"
},
{
"links": {...},
"name": "hyperv.dallas.bluemachines.com.invalid",
"hostAddress": "hyperv.dallas.bluemachines.com.invalid",
"user": {
"href": "https://10.0.0.100:-1/api/identity/user/2104"
},
"sslConnection": false,
"portNumber": 5985,
"type": "hyperv",
"id": "1002",
"uniqueId": "2d60ba76-9161-3492-ae5d-80f0b067760a",
"version": null,
"build": null,
"apiVersion": null,
"properties": {
"sysinfoVersion": {
"key": "version",
"value": "10.0.17763"
},
"sysinfoModel": {
"key": "model",
"value": "PowerEdge R610"
},
"sysinfoManufacturer": {
"key": "manufacturer",
"value": "Dell Inc."
},
"sysinfoDomain": {
"key": "domain",
"value": "hyperv.dallas.bluemachines.com.invalid"
},
"sysinfoOs": {
"key": "os",
"value": "Microsoft Windows Server 2019 Datacenter"
},
"sysinfoName": {
"key": "name",
"value": "win2016enghv"
}
},
"logicalDelete": false,
"opProperties": {
"snapshotConcurrency": 3,
"veServerInfo": null
},
"rbacPath": "root:0/hypervisor.all:0/hypervisor.type:hyperv/hypervis
↪or:1002",
"resourceType": "hypervisor"
},
{
"links": {...},
"name": "us-east-1",
"hostAddress": "10.0.0.100",
"user": {
"href": "https://10.0.0.100/api/identity/user/1002"
},
"sslConnection": false,
"portNumber": 11001,
"type": "awsec2",
"id": "1003",
"uniqueId": "us-east-1",
"version": null,
"build": null,
"apiVersion": null,
"properties": {},
"logicalDelete": false,
"accountName": "testEc2",
"displayName": "us-east-1",
"opProperties": {
"snapshotConcurrency": 0,
"veServerInfo": null
},
"rbacPath": "root:0/hypervisor.all:0/hypervisor.type:awsec2/hypervis
↪or:1005",
"resourceType": "hypervisor"
},
{...}, {...}, ..., {...}
]
}
Example 2: Get information about a specific virtualized system¶
Assume that you want to get information about a specific virtualized system: 10.0.0.20. You get the hypervisorHypervisorId of it: 1005.
A Python snippet that is similar to the following example can be used to request information about this virtualized system:
hypervisor_hypervisor_id = "1005"
requests.get('https://' + spp_ipv4 + '/api/hypervisor/'
+ hypervisor_hypervisor_id,
headers={...}, verify=...)
The request prompts a response that is structured as shown, with the HTTP status of 200 (OK).
{
"links": {...},
"name": "10.0.0.20",
"hostAddress": "10.0.0.20",
...,
"id": "1005",
...
}
Example 3: Get information about a specific type of virtualized systems¶
Assume that you only want to get information of vCenter Servers. Add the following parameter to the request, as shown in Example 1.
_params = {"filter": json.dumps([
{"property": "type",
"value": "vmware",
"op": "="
}
])}
requests.get('https://' + spp_ipv4 + '/api/hypervisor',
headers={...}, param=_param, verify=...)
The request prompts a response that is structured as shown, with the HTTP status of 200 (OK).
{
"links": {...},
"total": 2,
"hypervisors": [
{
"links": {...},
"name": "10.0.0.10",
"hostAddress": "10.0.0.10",
...
"type": "vmware",
"id": "1001",
...
},
{
"links": {...},
"name": "10.0.0.20",
"hostAddress": "10.0.0.20",
...,
"id": "1005",
...
}
]
}