Retrieval of VM managers
You use the GET operation on the api/sam/vmmanagers element to request information about VM managers that are defined in your infrastructure. The REST API returns more information than is visible on the user interface. It returns information about VM managers that are managed both in central and distributed mode, VM managers that were inactive for more than 90 days as well as those that were removed. It also returns information from virtualization technologies that do not require defining connection to the VM manager such as Xen or KVM without RHV-M. The scope of VM managers from which data is collected depends on which VM Manager Tools are installed on computers that belong to the computer group to which you are assigned.
Permissions
To retrieve information about VM managers, you must have the Manage VM Managers and Servers permission.
Resource URL
hhttps://server_url:server_port/api/sam/vmmanagers
Resource information
| Operation details | Description |
|---|---|
| Purpose | Returns a list of VM managers. |
| HTTP method | GET |
| Resource URI | https://server_url:server_port/api/sam/vmmanagers |
| Request headers |
|
Request Content-Type |
application/json |
| Response headers |
|
Response Content-Type |
application/json |
| Normal HTTP response codes |
|
| Error HTTP response codes |
Message body includes an error message with details. |
Response attributes
| Attribute | Possible values |
|---|---|
deleted |
Indicates whether the VM manager was removed from License Metric Tool. |
lastmodified |
The date and time when the VM manager was last modified. |
login |
User name that is used to access the VM manager. |
protocol |
Communication protocol used by the VM manager. The attribute is applicable only for Hyper-V and Azure Stack HCI.
|
sharedcredentials |
Indicates whether the VM manager shares credentials with other hosts in the same cluster. The attribute is applicable only for Hyper-V and Azure Stack HCI. |
status |
Status of the VM manager.
|
type |
Type of the VM manager.
|
url |
Web address of the VM manager. |
vmmanagerid |
ID of the VM manager. |
vmmanagertooltype |
VM Manager Tool deployment type.
|
vmmanagertoolid |
ID of the VM Manager Tool that collects information from the particular VM manager. |
Example HTTP conversation
- Request
-
GET https://server_url:server_port/api/sam/vmmanagers - Request header
-
Accept: application/json Accept-Language: en-US Token: <token> - Response body (JSON)
-
[{ "vmmanagerid":1, "protocol":null, "deleted":false, "vmmanagertoolid": 1, "sharecredentials":false, "lastmodified":"2016-06-12 09:06:51.723", "vmmanagertooltype":1, "login":"admin@internal", "type":3, "url":"https:\/\/<server_url>:<server_port>\/api", "status":98 }]