VMware {code} Community
RobBastiaansen_
Hot Shot
Hot Shot

how to authenticate for rest api with vCenter 6.5 appliance

Hello,

vCenter Appliance 6.5 has a feature to create a backup that can be restored with the installer gui. To create this backup one must access the appliance portal at port 5480. I would like to automate and schedule that backup. It can be accessed with the API's from the SDK. It must be possible to execute this via REST API. A bash sample is documented: 

https://pubs.vmware.com/vsphere-65/index.jsp#com.vmware.vsphere.vcsapg-rest.doc/GUID-222400F3-678E-4...

I have tried to authenticate to vCenter to invoke a rest operation from Orchestrator but I have not had any success.

I think that I can't use the right authentication mechanism, when I try to invoke the REST operation i get a 401 error. I have tried the basic authentication and I have looked at using the other mechanisms that are listed when adding a REST host in Orchestrator but can't figure out what to use.

If anyone has earlier connected with vCenter Appliance via REST and could share how to authenticate that information would be greatly appreciated.

Reply
0 Kudos
1 Reply
alanrenouf
VMware Employee
VMware Employee

For the backup API you should not access it over 5480, the docs are here which explain the API location and details: https://vdc-repo.vmware.com/vmwb-repository/dcr-public/1cd28284-3b72-4885-9e31-d1c6d9e26686/9a0dbc46...

You will need to use the authentication API to get a session here: https://vdc-repo.vmware.com/vmwb-repository/dcr-public/1cd28284-3b72-4885-9e31-d1c6d9e26686/9a0dbc46...

for Orchestrator you may want to use the vAPI plugin which should be able to access this API easier than the REST plugin.

Blog: http://virtu-al.net Twitter: http://twitter.com/alanrenouf Co-author of the PowerCLI Book: http://powerclibook.com
Reply
0 Kudos