To add a new vCenter server, use the following request:

POST /settings/vcenter_servers.xml
POST /settings/vcenter_servers.json

XML Request Example

curl -i -X POST -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass --url http://onapp.test/settings/vcenter_servers.xml -d '<vcenter_server><label>vcenter_label</label><api_url>vc-a.onappdev.lviv</api_url><login>administrator@vsphere.local</login><password>vsphere_pass</password></vcenter_server>'
CODE

JSON Request Example

curl -i -X POST -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass --url http://onapp.test/settings/vcenter_servers.json -d '{"vcenter_server": {"label": "vcenter_server_label", "api_url": "vc-b.onappdev.lviv", "login": "administrator@vsphere.local", "password": "vsphere_pass"}}'
CODE

Where:

label -  the label of the vCenter server

api_url - the API URL of the vCenter server on the vCenter side

login - your vCenter login

password - your vCenter password