Returns the URI endpoint for performing queries of a
        Predix Time Series instance from environment inspection.
772447
def _get_query_uri(self):
        
        if 'VCAP_SERVICES' in os.environ:
            services = json.loads(os.getenv('VCAP_SERVICES'))
            predix_timeseries = services['predix-timeseries'][0]['credentials']
            return predix_timeseries['query']['uri'].partition('/v1')[0]
        else:
            return predix.config.get_env_value(self, 'query_uri')
841814
def get_coi(self, params_dict):
        
        lat = str(params_dict['lat'])
        lon = str(params_dict['lon'])
        start = params_dict['start']
        interval = params_dict['interval']

        # build request URL
        if start is None:
            timeref = 'current'
        else:
            if interval is None:
                timeref = self._trim_to(timeformatutils.to_date(start), 'year')
            else:
                timeref = self._trim_to(timeformatutils.to_date(start), interval)

        fixed_url = '%s/%s,%s/%s.json' % (CO_INDEX_URL, lat, lon, timeref)
        uri = http_client.HttpClient.to_url(fixed_url, self._API_key, None)
        _, json_data = self._client.cacheable_get_json(uri)
        return json_data
23390
public static String decodeEndpointURI(String endpoint) {
        int ind=endpoint.indexOf('[');
        if (ind == 0) {
            return null;
        } else if (ind != -1) {
            return endpoint.substring(0, ind);
        }
        return endpoint;
    }
1092710
public static String getHistoryResourceURI(String uri, ServletRequest req) {

        String histUri = uri;
        if (CmsHistoryResourceHandler.isHistoryRequest(req)) {
            String version = req.getParameter(CmsHistoryResourceHandler.PARAM_VERSION);
            histUri = CmsRequestUtil.appendParameter(uri, CmsHistoryResourceHandler.PARAM_VERSION, version);
        }
        return histUri;
    }
278949
def resource_uri(self):
        
        primary_key_value = getattr(self, self.primary_key(), None)
        return '/{}/{}'.format(self.endpoint(), primary_key_value)
465647
def get_metric_time_series(self, mts_id, **kwargs):
        """"""
        return self._get_object_by_name(self._MTS_ENDPOINT_SUFFIX,
                                        mts_id,
                                        **kwargs)
170496
def endpoint(self):
        
        if self.endpoint_ref and self.tunnel_interface_ref:
            return InternalEndpoint(href=self.endpoint_ref)
        return Element.from_href(self.endpoint_ref)
428915
def _get_service_endpoint(context, svc, region=None, public=True):
    
    region = _safe_region(region)
    # If a specific context is passed, use that. Otherwise, use the global
    # identity reference.
    context = context or identity
    url_type = {True: "public", False: "private"}[public]
    svc_obj = context.services.get(svc)
    if not svc_obj:
        return None
    ep = svc_obj.endpoints.get(region, {}).get(url_type)
    if not ep:
        # Try the "ALL" region, and substitute the actual region
        ep = svc_obj.endpoints.get("ALL", {}).get(url_type)
    return ep
705422
private Mono<String> getTokenFromUri(String uri) {
        URL url = null;
        try {
            url = new URL(uri);
        } catch (MalformedURLException e) {
            return Mono.error(e);
        }
        String host = String.format("%s://%s%s/", url.getProtocol(), url.getHost(), url.getPort() > 0 ? ":" + url.getPort() : "");
        String resource = environment().managementEndpoint();
        for (Map.Entry<String, String> endpoint : environment().endpoints().entrySet()) {
            if (host.contains(endpoint.getValue())) {
                if (endpoint.getKey().equals(Endpoint.KEYVAULT.identifier())) {
                    resource = String.format("https://%s/", endpoint.getValue().replaceAll("^\\.*", ""));
                    break;
                } else if (endpoint.getKey().equals(Endpoint.GRAPH.identifier())) {
                    resource = environment().graphEndpoint();
                    break;
                } else if (endpoint.getKey().equals(Endpoint.LOG_ANALYTICS.identifier())) {
                    resource = environment().logAnalyticsEndpoint();
                    break;
                } else if (endpoint.getKey().equals(Endpoint.APPLICATION_INSIGHTS.identifier())) {
                    resource = environment().applicationInsightsEndpoint();
                    break;
                } else if (endpoint.getKey().equals(Endpoint.DATA_LAKE_STORE.identifier())
                        || endpoint.getKey().equals(Endpoint.DATA_LAKE_ANALYTICS.identifier())) {
                    resource = environment().dataLakeEndpointResourceId();
                    break;
                }
            }
        }
        return getToken(resource);
    }
1331658
@Provides
	@Singleton
	@Named(GuiceProperties.STATIC_ENDPOINT_CONFIG_NAME)
	public URI getRestServicesEndpoint(LocalEndpointDiscovery localEndpointDiscovery)
	{
		final URI base = localEndpointDiscovery.getLocalEndpoint();

		return base;
	}
240902
def get_openshift_base_uri(self):
        
        deprecated_key = "openshift_uri"
        key = "openshift_url"
        val = self._get_value(deprecated_key, self.conf_section, deprecated_key)
        if val is not None:
            warnings.warn("%r is deprecated, use %r instead" % (deprecated_key, key))
            return val
        return self._get_value(key, self.conf_section, key)
1207936
def get_endpoint(endpoint_id)
      endpoint = EndPoint.new(@client.make_request(:get, @client.concat_user_path("#{DOMAIN_PATH}/#{id}/endpoints/#{endpoint_id}"))[0],
                           @client)
      endpoint.domain_id = id
      endpoint
    end
8819
public String getRack(InetAddress endpoint)
    {
        String[] info = getEndpointInfo(endpoint);
        assert info != null : "No location defined for endpoint " + endpoint;
        return info[1];
    }
871630
function getEndpoint(origin, locale, path) {
  const validOrigin = Object.prototype.hasOwnProperty.call(endpoints, origin) ? origin : 'us';
  const endpoint = endpoints[validOrigin];

  return Object.assign(
    {},
    { origin: validOrigin },
    { hostname: origin === 'cn' ? endpoint.hostname : getPathHostName(validOrigin, path) },
    { locale: endpoint.locales.find(item => item === locale) || endpoint.defaultLocale },
  );
}
1312829
public String resolveEndpointUri(Message message, String defaultUri) {
        Map<String, Object> headers = message.getHeaders();

        String requestUri;
        if (headers.containsKey(ENDPOINT_URI_HEADER_NAME)) {
            requestUri = headers.get(ENDPOINT_URI_HEADER_NAME).toString();
        } else if (StringUtils.hasText(defaultUri)) {
            requestUri = defaultUri;
        } else {
            requestUri = defaultEndpointUri;
        }

        if (requestUri == null) {
            throw new CitrusRuntimeException("Unable to resolve dynamic endpoint uri! Neither header entry '" +
                    ENDPOINT_URI_HEADER_NAME + "' nor default endpoint uri is set");
        }

        requestUri = appendRequestPath(requestUri, headers);
        requestUri = appendQueryParams(requestUri, headers);

        return requestUri;
    }
564614
public static URI getUri(ServiceInstance instance) {
		String scheme = (instance.isSecure()) ? "https" : "http";
		String uri = String.format("%s://%s:%s", scheme, instance.getHost(),
				instance.getPort());
		return URI.create(uri);
	}
457230
def fetch_synchronous(self, endpoint_name, query_params=None):
        """"""

        endpoint_url = constants.URL_PREFIX + "/" + self._version + "/" + endpoint_name

        if query_params is None:
            query_params = {}

        return self._request_client.get(endpoint_url, query_params)