# ES6 RC1: get aliases of non existent index

**URL:** https://discuss.elastic.co/t/es6-rc1-get-aliases-of-non-existent-index/104267
**Category:** Elasticsearch
**Created:** [October 17, 2017, 3:14pm UTC](https://discuss.elastic.co/t/es6-rc1-get-aliases-of-non-existent-index/104267 "2017-10-17T15:14:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![frankshad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frankshad/32/11031_2.png) [@frankshad](https://discuss.elastic.co/u/frankshad)
#### Post date: [October 17, 2017, 3:14pm UTC](https://discuss.elastic.co/t/es6-rc1-get-aliases-of-non-existent-index/104267/1 "2017-10-17T15:14:10Z")

</div>

I have an installer script that checks whether an index is already installed, by asking for the aliases of the index by its alias name, equivalent to:

`curl "http://192.168.0.153:9200/dev_userdetail/_aliases"`

(if it were already installed, `dev_userdetail` would be an alias name, not an index name, but the normal situation here is that neither the index nor alias would exist).

In ES5.4 this used to return a 404 if the index/alias did not exist (which is what I'd expect). In ES6 RC1 it returns a 405 error instead, and says:

`{"error":"Incorrect HTTP method for uri [/dev_userdetail/_aliases] and method [GET], allowed: [PUT]","status":405}`

It may be there in the breaking changes, but I haven't found it yet. This looks vaguely relevant: [https://www.elastic.co/guide/en/elasticsearch/reference/6.0/breaking\_60\_indices\_changes.html#\_indices\_aliases\_api\_resolves\_indices\_expressions\_only\_against\_indices](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/breaking_60_indices_changes.html#_indices_aliases_api_resolves_indices_expressions_only_against_indices) but doesn't really seem to be what I'm doing.

Is this an intentional change, or a bug?

---

<div class="post-metadata">

### Author: ![frankshad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frankshad/32/11031_2.png) [@frankshad](https://discuss.elastic.co/u/frankshad)
#### Post date: [October 17, 2017, 3:17pm UTC](https://discuss.elastic.co/t/es6-rc1-get-aliases-of-non-existent-index/104267/2 "2017-10-17T15:17:03Z")

</div>

... and in fact, having commented out my 404 test to let it continue, even after having created both index and alias, that cURL returns the same 405 error, and whether the request is via an alias or an index name.

---

<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: [November 14, 2017, 3:17pm UTC](https://discuss.elastic.co/t/es6-rc1-get-aliases-of-non-existent-index/104267/3 "2017-11-14T15:17:09Z")

</div>

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