# Can't create index externally? - 400 error

**URL:** <https://discuss.elastic.co/t/cant-create-index-externally-400-error/13403>\
**Category:** Elasticsearch\
**Created:** [August 30, 2013, 4:08am UTC](https://discuss.elastic.co/t/cant-create-index-externally-400-error/13403 "2013-08-30T04:08:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Schoen](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@Matt\_Schoen](https://discuss.elastic.co/u/Matt_Schoen)\
**Post date:** [August 30, 2013, 4:08am UTC](https://discuss.elastic.co/t/cant-create-index-externally-400-error/13403/1 "2013-08-30T04:08:11Z")

</div>

Hi there,

I'm building a game in Unity and using Elasticsearch as a rather basic  
datastore, leveraging its ability to scale for high-volume insertion. I've  
become somewhat familiar with the software over the past few weeks but am  
definitely still a noob. I'm also using a web-based backend to  
view/manipulate the data that I'm getting from my game, and I've recently  
added an "init" button to the backend in order to easily reset and setup my  
index. Until now I've been using the JS-based Head plugin to do basic  
operations like create/destroy indices and browse the data.

I'm using the REST web APIs for everything (from the game and from the web)  
and I've been able to follow all the curl examples exactly except for  
creating the index. When I use the provided example request (PUT  
http://my\_server:9200/the\_index) I get a (400) - Bad Request error. I've  
checked and re-checked my syntax and tried exactly the same request locally  
via curl, and everything appears to be working. Is this just a security  
restriction--that you can't create indices from external requests?

How might I get around this for my own testing purposes. Obviously I  
wouldn't extend this functionality to anyone but myself. Maybe I could  
create a simple Java program to listen for a certain request and have that  
create the index? I'm hoping that either this is a bug, and I can go fix  
it in the source, or that there's a simpler workaround.

Any ideas? Thanks!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [August 30, 2013, 7:28am UTC](https://discuss.elastic.co/t/cant-create-index-externally-400-error/13403/2 "2013-08-30T07:28:10Z")

</div>

Hi,

There is no such restriction, is there an error message with the 400  
response or in Elasticsearch's logs?

--  
Adrien Grand

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Matt\_Schoen](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@Matt\_Schoen](https://discuss.elastic.co/u/Matt_Schoen)\
**Post date:** [August 30, 2013, 6:32pm UTC](https://discuss.elastic.co/t/cant-create-index-externally-400-error/13403/3 "2013-08-30T18:32:21Z")

</div>

Well shoot... now that I try again (to get the log info) it works fine...  
what a mystery...

On Friday, August 30, 2013 3:28:10 AM UTC-4, Adrien Grand wrote:

> Hi,
> 
> There is no such restriction, is there an error message with the 400  
> response or in Elasticsearch's logs?
> 
> --  
> Adrien Grand

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:18am UTC](https://discuss.elastic.co/t/cant-create-index-externally-400-error/13403/4 "2017-07-06T02:18:43Z")

</div>


