# Creating Elasticsearch indices using REST api protected by SHIELD

**URL:** <https://discuss.elastic.co/t/creating-elasticsearch-indices-using-rest-api-protected-by-shield/42472>\
**Category:** Elasticsearch\
**Created:** [February 23, 2016, 8:52am UTC](https://discuss.elastic.co/t/creating-elasticsearch-indices-using-rest-api-protected-by-shield/42472 "2016-02-23T08:52:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![krushnat\_khawale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krushnat_khawale/32/6652_2.png) [@krushnat\_khawale](https://discuss.elastic.co/u/krushnat_khawale)\
**Post date:** [February 23, 2016, 8:52am UTC](https://discuss.elastic.co/t/creating-elasticsearch-indices-using-rest-api-protected-by-shield/42472/1 "2016-02-23T08:52:32Z")

</div>

```
     I want to create a template where user going to create indices in Elasticsearch.
    We are asked to use plain javascript, and our ES is protected by SHIELD.
    So how create ES index using REST api in Javascript.

       My major problem is how to authenticate ES users?
```

---

<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 5, 2017, 11:14pm UTC](https://discuss.elastic.co/t/creating-elasticsearch-indices-using-rest-api-protected-by-shield/42472/2 "2017-07-05T23:14:16Z")

</div>


