You can create a function that obtains the endpoint URLs of a service on all vCenter Server instances in the environment. You can modify that function to obtain the endpoint URL of a service on a particular vCenter Server instance.

Establish a connection with the Lookup Service.

Retrieve a service registration object.

1

Create a filter criterion for service information.

2

Create a filter criterion for endpoint information.

3

Create the registration filter object.

Option

Description

Omit the node ID parameter

Retrieves the endpoint URLs of the service on all vCenter Server instances.

Include the node ID parameter

Retrieves the endpoint URL of the service on a particular vCenter Server instance.

4

Retrieve the specified service information by using the List() function.

Depending on whether you included the node ID parameter, the List() function returns different results.

A list of endpoint URLs for a service that are is hosted on all vCenter Server instances in the environment.

An endpoint URL of a service that runs on a particular vCenter Server.

Call the function that you implemented to retrieve service endpoints. You can pass different filter parameters depending on the service endpoints that you need. For more information, see Filter Parameters for Predefined Service Endpoints.

To retrieve a service endpoint on a particular vCenter Server instance, you must retrieve the node ID of that instance and pass it to the function. For information about how to retrieve the ID of a vCenter Server instance, see Retrieve a vCenter Server ID by Using the Lookup Service.