# List available configuration files through the API

**URL:** <https://discuss.elastic.co/t/list-available-configuration-files-through-the-api/117979>\
**Category:** Elasticsearch\
**Created:** [February 1, 2018, 9:26am UTC](https://discuss.elastic.co/t/list-available-configuration-files-through-the-api/117979 "2018-02-01T09:26:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![lleeoo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lleeoo/32/41624_2.png) [@lleeoo](https://discuss.elastic.co/u/lleeoo)\
**Post date:** [February 1, 2018, 9:26am UTC](https://discuss.elastic.co/t/list-available-configuration-files-through-the-api/117979/1 "2018-02-01T09:26:05Z")

</div>

I there a way to list the configuration files that exist in the Elasticsearch `conf` directory (usually /etc/elasticsearch) using only the Elasticsearch API?

For example, I would like to know if a specific configuration file for synonyms is available.

Thank you for your help.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 1, 2018, 10:00am UTC](https://discuss.elastic.co/t/list-available-configuration-files-through-the-api/117979/2 "2018-02-01T10:00:29Z")

</div>

No you can't.

---

<div class="post-metadata">

**Author:** ![lleeoo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lleeoo/32/41624_2.png) [@lleeoo](https://discuss.elastic.co/u/lleeoo)\
**Post date:** [February 1, 2018, 10:12am UTC](https://discuss.elastic.co/t/list-available-configuration-files-through-the-api/117979/3 "2018-02-01T10:12:46Z")

</div>

Thank you. Do you have a suggestion as to what would be the lightest way to check resource availibility then? If possible, I would like to avoid the following:

```auto
1) Try creating an index with an analyzer that uses file X
2) Catch an error / No error --> decide if the file X exists
3) Delete the index

```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 1, 2018, 10:51am UTC](https://discuss.elastic.co/t/list-available-configuration-files-through-the-api/117979/4 "2018-02-01T10:51:22Z")

</div>

Why would you have a broken installation ?

---

<div class="post-metadata">

**Author:** ![lleeoo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lleeoo/32/41624_2.png) [@lleeoo](https://discuss.elastic.co/u/lleeoo)\
**Post date:** [February 1, 2018, 10:59am UTC](https://discuss.elastic.co/t/list-available-configuration-files-through-the-api/117979/5 "2018-02-01T10:59:31Z")

</div>

My install is fine; my issue is with confirming that resource files are available.

I am working on a python package that provides mulitple analyzers, some of which require resources. If a user decides to use an analyzer that requires resources, I want to check that this file is available and create it if necessary. Using standard os functions like `ls /etc/elasticsearch` requires sudo permissions by default which I would rather avoid.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 1, 2018, 2:47pm UTC](https://discuss.elastic.co/t/list-available-configuration-files-through-the-api/117979/6 "2018-02-01T14:47:41Z")

</div>

May be you can write a plugin which exposes a REST endpoint and check that on all nodes.

Not sure you need to do that though.

And I'm pretty sure you don't have to sudo to read the config file as elasticsearch user normally has access to it without needing to sudo).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 1, 2018, 2:48pm UTC](https://discuss.elastic.co/t/list-available-configuration-files-through-the-api/117979/7 "2018-03-01T14:48:15Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
