Adding and updating VM managers

You use the PUT operation on the api/sam/vmmanagers element to add or update VM managers. You can perform these actions only for VM managers that are managed in central mode.

To add or update VM managers, the following requirements must be met:
  • You must have the Manage VM Managers and Servers permission
  • The computer group to which you are assigned must contain the computer on which the central VM Manager Tool is installed
Table 1. Operation descriptions

The table consists of two columns and 15 rows.

Operation details Description
Operation PUT api/sam/vmmanagers
Purpose Adds a new VM manager or changes an existing one.
HTTP method PUT
Resource URI https://server_host_name:port_number/api/sam/vmmanagers?token=token
Request Content-Type application/json
Response Content-Type application/json
Normal HTTP response codes
  • 200 - OK
Error HTTP response codes
  • 400 – "Bad Request" if a query parameter contains errors or is missing
  • 401 – "Unauthorized" if the user does not have the Manage VM Managers and Servers permission
  • 403 – "Forbidden" if the computer where the central VM Manager Tool is installed does not belong to the computer group that the user is assigned
  • 500 – "Internal Server Error" if no VM Manager Tool is defined in the BigFix Inventory database. The code might also indicate an unknown problem that requires contacting BigFix support.

Request attributes

Table 2. Request attributes
Attribute Description
login User name that is used to access the VM manager.
password Password that is used to access the VM manager. The password is encrypted after it is sent.
protocol Communication protocol used by the VM manager. The attribute is applicable only for Hyper-V.
  • 0 - WinRM
  • 1 - PowerShell
sharecredentials Indicates whether the VM manager shares credentials with other hosts in the same cluster. The attribute is applicable only for Hyper-V.
  • true - the VM manager shares the credentials and it is not necessary to specify them
  • false - the VM manager does not share the credentials
type Type of the VM manager.
  • 1 - Hyper-V
  • 2 - vCenter
  • 3 - RHEV-M
  • 9.2.12 4 - XenServer or Citrix XenServer
url Web address of the VM manager. You can specify a full URL, a host name, or an IP address. The default URL differs depending on the virtualization type.
  • vCenter
    • For versions up to 5.1: https://<vCenter_IP_address>/sdk
    • For version 5.5 and higher: https://<vCenter_IP_address>/sdk/vimService.wsdl
  • RHEV-M
    • For version 3.0: https://<RHEV-M_IP_address>:8443/api
    • For version 3.1 and higher: https://<RHEV-M_IP_address>/api
    • For version 4.0: https://<RHEV-M_IP_address>/ovirt-engine/api
  • Hyper-V
    • https://<Hyper-V_IP_address>/wsman
  • 9.2.12 XenServer or Citrix XenServer
    • https://<xen-server>
  • 9.2.14 Oracle VM Server for x86
    • https://<OVM-Manager_IP_address>:7002/ovm/core/wsapi/rest
  • 9.2.17 Nutanix
    • https://<NUTANIX_PRISM_IP_ADDRESS>:9440/PrismGateway/services/rest/v2.0
vmmanagerid ID of the VM manager that you want to change. To obtain the ID, use REST API for the retrieval of VM managers.
vmmanagertoolid ID of the VM Manager Tool that collects data from the VM manager that you want to change. To obtain the ID, use REST API for the retrieval of VM managers.

Example HTTP conversation - adding a VM manager

To add a new VM manager, provide the following attributes:
  • login
  • password
  • url
  • type
Request
PUT http://localhost:9081/api/sam/vmmanagers
?token=7adc3efb175e2bc0f4484bdd2efca54a8fa04623
[{
    "login":"user1",
    "password":"vZaW1Ve6",
    "url":"192.0.2.24",
    "type":2
}]
Response
200 OK

Example HTTP conversation - changing a VM manager

To change an existing VM manager, provide the following attributes:
  • login
  • password
  • url
  • type
  • vmmanagerid
  • vmmanagertoolid
Important: All attributes must be provided in the request regardless of how many of the attributes you want to change.
Request
PUT http://localhost:9081/api/sam/vmmanagers
?token=7adc3efb175e2bc0f4484bdd2efca54a8fa04623
[{
    "vmmanagerid":1,
    "vmmanagertoolid":1,
    "login":"user1",
    "password":"vZaW1Ve6",
    "url":"192.0.2.24",
    "type":3
}]
Response
200 OK