Update vCenter VS Credentials
To update your vCenter virtual server credentials, use the following request:
1
2
| POST /virtual_machines/:virtual_machine_id/service_credentials.xml
POST /virtual_machines/:virtual_machine_id/service_credentials.json
|
XML Request Example
1
| curl -i -X POST -u user_email:api_key --url http://onapp.test/virtual_machines/44/service_credentials.xml -H 'Accept: application/xml' -H 'Content-type: application/xml' -d '<vcenter_service_credentials><username>username</username><password>password</password></vcenter_service_credentials>'
|
JSON Request Example
1
| curl -i -X POST -u user_email:api_key --url http://onapp.test/virtual_machines/44/service_credentials.json -H 'Accept: application/json' -H 'Content-type: application/json' -d '{"vcenter_service_credentials": {"username": "username", "password": "password"}}'
|
XML Output Example
1
2
3
4
5
6
| <vcenter_service_credentials>
<username>username</username>
<password>password</password>
<virtual_machine_id>44</virtual_machine_id>
<id>14</id>
</vcenter_service_credentials>
|
Where:
username - the username used by the user when accessing the system
password - the password used by the user when accessing the system
virtual_machine_id - the ID of the virtual server
id - the ID of the user