I wanted to do some testing on Center rest API, so I get the relevant method from centre developer page(ex https://developer.vmware.com/apis/vsphere-automation/latest/vcenter/api/vcenter/vm/get/) and trying to get it using postman. Then I’m getting an unauthenticated error. So I tried with the password as well using basic authentication. But the result was the same
To avoid this error. First, we need to get the session id using basic authentication. Please see the below picture.
The method should be Post
Basic authentication and we can use our credential
This will generate a session id. We need to copy this
After that, I was able to avoid that error.
We need to use API key authentication and the key value should be the session id which we copied earlier.