Where to set the service endpoint with the java api?

Hi!
I'm using the java api and I can't figure out how to set the endpoint of my elastic search rest service. My service is at: "https://myhost/els", and I connect like this:

client = TransportClient.builder().settings(settings).build()
                    .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("myhost"), 443));

UpdateRequest updateRequest = new UpdateRequest();
            updateRequest.index("myindex"); <-- this is the index name and not the path, right?
            updateRequest.type("mytype");

            client.update(updateRequest).get();

Where do I set the path ('els')?

I have successfully searched the index with the rest client api already:

restClient = RestClient.builder(
                    new HttpHost("myhost", 443,"https")).build();
Response response = restClient.performRequest("POST", "/els/_search",
                    Collections.singletonMap("pretty", "true"), entity);

but the java api doesn't work this way.

Thanks for your help.
Andreas

It is more correct to call the thing you are calling "the java API" the "transport client" because it uses Elasticsearch's internal transport protocol. You can't use 443, you need 9300. It isn't HTTP, just home grown binary thrown over tcp.

ok, I see.
Thanks a lot!