# Accessing elasticsearch api url

**URL:** <https://discuss.elastic.co/t/accessing-elasticsearch-api-url/363877>\
**Category:** Elasticsearch\
**Created:** [July 26, 2024, 4:26pm UTC](https://discuss.elastic.co/t/accessing-elasticsearch-api-url/363877 "2024-07-26T16:26:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mealbert23](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@mealbert23](https://discuss.elastic.co/u/mealbert23)\
**Post date:** [July 26, 2024, 4:26pm UTC](https://discuss.elastic.co/t/accessing-elasticsearch-api-url/363877/1 "2024-07-26T16:26:14Z")

</div>

Hi,

I have recently setup an elasticsearch and kibana system on aws eks. Everything seems to be running without issues. fleet server/agents and elastic agents are running, kibana is accessible from a public url, and elasticsearch is running without issue. The devs are now trying to access the elasticsearch api to create indexes and load data but keep getting connection issues. Most if not all of the examples in the documentation are localhost:9200 which isn't very helpful. We have tried connecting to the kibanaurl:9200 but that times out. We have also tried various other urls and get errors (usually connection refused). Is there any other url or endpoint we should be trying to get this working? Is there some log we should be checking for additional info? Or some network configuration we are missing to get this access? We are all new to elasticsearch and kibana so any help would be appreciated.

Thanks,  
Mark

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [July 26, 2024, 4:58pm UTC](https://discuss.elastic.co/t/accessing-elasticsearch-api-url/363877/2 "2024-07-26T16:58:07Z")

</div>

By default Elasticsearch listens for API requests on `localhost:9200` but you can of course change this, see [these docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html) and in particular [this subsection](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#http-settings).

Each node logs the address(es) at which it's listening for connections in a log line that looks like this:

```auto
$ cat build/testclusters/runTask-0/logs/*.log | grep HttpServer
[2024-07-25T13:49:53,200][INFO][o.e.h.AbstractHttpServerTransport] [runTask-0] publish_address {127.0.0.1:9200}, bound_addresses {[::1]:9200}, {127.0.0.1:9200}

```

In this case, my `bound_addresses` are `[::1]:9200` and `127.0.0.1:9200` so those are the addresses I can use to issue API requests.

---

<div class="post-metadata">

**Author:** ![mealbert23](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@mealbert23](https://discuss.elastic.co/u/mealbert23)\
**Post date:** [August 2, 2024, 9:03pm UTC](https://discuss.elastic.co/t/accessing-elasticsearch-api-url/363877/3 "2024-08-02T21:03:30Z")

</div>

Hi @DavidTurner,  
Thanks for the quick reply. I ended up creating a ingress yaml file similar to kibana and then setting up all the target groups etc. in AWS and that seemed to work. Messing with the transport/http settings ended up auto configuring an internal facing network load balancer that wasn't accessible.

Thanks,  
Mark
