Retrieving Service
EndpointsLast Updated December 16, 2024
To access services and resources in the
virtual environment, client applications that use the
vSphere
Automation
API
must know the endpoints of vSphere
Automation
and
vSphere services. Client applications retrieve service endpoints from the Lookup Service
that runs on vCenter Server
. The Lookup Service provides service registration and
discovery by using the vSphere Web Services API. By using the Lookup Service, you can
retrieve endpoints of services on
vCenter
Server
. The
following endpoints are available from the Lookup Service. - The vCenter Single Sign-On endpoint onvCenter Server. You can use the vCenter Single Sign-On service to get a SAML token and establish an authenticated session with avSphere AutomationAPI endpoint or avCenter Serverendpoint.
- ThevSphere AutomationAPI endpoint onvCenter Server. Through thevSphere Automationendpoint, you can make requests tovSphere AutomationAPI services such as virtual machine management, Content Library, and Tagging.
- ThevCenter Serverendpoint. In case you want to retrieve service endpoints on avCenter Serverinstance that is part of a vCenter Enhanced Linked Mode group, use thevCenter Serverendpoint to get the node IDs of all linked instances. You can use the node ID of the specificvCenter Serverinstance to retrieve service endpoints on that instance.
- The vSphere Web Services API endpoint and endpoints of other vSphere Web services that run onvCenter Server.
Workflow for
Retrieving Service Endpoints
The workflow that you use to
retrieve service endpoints from the Lookup Service might vary depending on the
endpoints that you need and their number. Follow this general workflow for
retrieving service endpoints.
- Connect to the Lookup Service onvCenter Serverand service registration object so that you can query for registered services.
- Create a service registration filter for the endpoints that you want to retrieve.
- Use the filter to retrieve the registration information for services from the Lookup Service.
- Extract one or more endpoint URLs from the array of registration information that you receive from the Lookup Service.