VMware Cloud Community
Hazenet
Enthusiast
Enthusiast

Go from VAPI:VAPIEndpoint to VC:SdkConnection

What is the best way to figure out the corresponding VC:SdkConnection of a VAPI:VAPIEndpoint?

I am aware that there might not be a corresponding VC:SdkConnection.

Is there a UUID I can use, that is common between the two?

I could of cause do some testing and logic between the vAPI Endpoint URL and the SdkConnection.name, which should match, but one might be entered by IP and the by fqdn.

I would prefer some for of internal UUID or similar.

0 Kudos
1 Reply
iiliev
VMware Employee
VMware Employee

VC:SdkConnection has a property instanceUuid, which is kind of UUID of the corresponding vCenter server.

VAPI:VAPIEndpoint has no such property. It is a simply alias for vAPI endpoint URL + username/password. So you'd need to figure out if this vAPI endpoint is a vCenter endpoint (it could be something else; eg. NSX endpoint). Then, you'd need to figure out if there is a corresponding vAPI service/method that returns vCenter's instanceUuid eg. as part of some 'about' info. I don't think current vCenter vAPI exposes such service but I might be wrong here.

0 Kudos