# Wich RestHandler for Index Settings?

**URL:** <https://discuss.elastic.co/t/wich-resthandler-for-index-settings/24536>\
**Category:** Elasticsearch\
**Created:** [June 29, 2015, 10:00am UTC](https://discuss.elastic.co/t/wich-resthandler-for-index-settings/24536 "2015-06-29T10:00:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ESUser10](https://avatars.discourse-cdn.com/v4/letter/e/f4b2a3/32.png) [@ESUser10](https://discuss.elastic.co/u/ESUser10)\
**Post date:** [June 29, 2015, 10:00am UTC](https://discuss.elastic.co/t/wich-resthandler-for-index-settings/24536/1 "2015-06-29T10:00:34Z")

</div>

If I create a index like:  
PUT /test  
{  
"type": "test",  
"fs": {  
"url": "c:\temp",  
"update\_rate": "1h"

}  
}

I will get this settings of the Index with a RestHandler in a Plugin.  
MyQuestion is wich Resthandler can I use to get the IndexSettings?

---

<div class="post-metadata">

**Author:** ![alexmack](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@alexmack](https://discuss.elastic.co/u/alexmack)\
**Post date:** [June 29, 2015, 10:15am UTC](https://discuss.elastic.co/t/wich-resthandler-for-index-settings/24536/2 "2015-06-29T10:15:57Z")

</div>

What information do you want to get exactly?  
For basic informations about the count of documents or the status of the index you can use the following command:

```
curl 'localhost:9200/_cat/indices?v'

```

Cheers,  
Alex

---

<div class="post-metadata">

**Author:** ![ESUser10](https://avatars.discourse-cdn.com/v4/letter/e/f4b2a3/32.png) [@ESUser10](https://discuss.elastic.co/u/ESUser10)\
**Post date:** [June 29, 2015, 10:18am UTC](https://discuss.elastic.co/t/wich-resthandler-for-index-settings/24536/3 "2015-06-29T10:18:50Z")

</div>

I write a plugin. If a Index created, i will get the index settings.  
The BaseRestHandler (public class ManageIndicesRestActions extends BaseRestHandler) get only the Index Name.  
But I will get the Settings of the Index:  
PUT /test  
{  
"type": "test",  
"fs": {  
"url": "c:\temp",  
"update\_rate": "1h"

}  
}

---

<div class="post-metadata">

**Author:** ![alexmack](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@alexmack](https://discuss.elastic.co/u/alexmack)\
**Post date:** [June 29, 2015, 12:01pm UTC](https://discuss.elastic.co/t/wich-resthandler-for-index-settings/24536/4 "2015-06-29T12:01:58Z")

</div>

Hmm.. I'm not quite sure if I got your question..  
You create an index with a command like the following:

```
curl -XPUT 'localhost:9200/test?pretty' -d '
{
"mappings": {....}
}'

```

Once you've done that, you can add items e.g.

```
PUT /test
{
  "type": "test",
  "fs": {
    "url": "c:\temp",
    "update_rate": "1h"

  }
}

```

If you want to get deeper informations about the index, you can use the stats API:

[https://www.elastic.co/guide/en/elasticsearch/reference/1.x/indices-stats.html](https://www.elastic.co/guide/en/elasticsearch/reference/1.x/indices-stats.html)

Does that help you?

---

<div class="post-metadata">

**Author:** ![ESUser10](https://avatars.discourse-cdn.com/v4/letter/e/f4b2a3/32.png) [@ESUser10](https://discuss.elastic.co/u/ESUser10)\
**Post date:** [June 29, 2015, 12:09pm UTC](https://discuss.elastic.co/t/wich-resthandler-for-index-settings/24536/5 "2015-06-29T12:09:14Z")

</div>

No that was not my question.  
Also I write a plugin with a RestController:

```
public class ManageIndicesRestActions extends BaseRestHandler {{

    @Inject
    public ManageIndicesRestActions(Settings settings, final Client client,
        final RestController controller) {
    super(settings, controller, client);

    /* close index */
    controller.registerHandler(Method.POST, "/{index}/_close", this);
    controller.registerHandler(Method.PUT, "/{index}/_close", this);

    /* open index */
    controller.registerHandler(Method.POST, "/{index}/_open", this);
    controller.registerHandler(Method.PUT, "/{index}/_open", this);

    /* create index */
    controller.registerHandler(Method.POST, "/{index}", this);
    controller.registerHandler(Method.PUT, "/{index}", this);

    }

```

If a create a Index with

```
   PUT /test
{
  "type": "test",
  "fs": {
    "url": "c:\temp",
    "update_rate": "1h"

  }
}

```

then this Controller handleRequest Method is called. In this Method I receive only the Index name and not the others settings like "url, uodate\_rate,,,,,,"

---

<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:** [July 6, 2017, 12:04am UTC](https://discuss.elastic.co/t/wich-resthandler-for-index-settings/24536/6 "2017-07-06T00:04:49Z")

</div>


