This example provides a common pattern for filtering Lookup Service registration data. This example is based on the code in the lookup_service_helper.rb sample file. The file is located in the following vCloud Suite SDK for Ruby directory: client/samples/lib/sample/common/

This example uses the steps that are described in the Retrieve a vCloud Suite Endpoint on a vCenter Server Instance procedure.

service_infos = lookup_service_infos(prod='com.vmware.cis',
                                              svc_type='cs.vapi',
                                              proto='vapi.json.https.public',
                                              ep_type='com.vmware.vapi.endpoint',
                                              node_id=$my_mgmt_node_id)
service_infos = [service_infos] if service_infos.is_a?Hash
$my_vapi_url = service_infos[0][:service_endpoints][:url]