# Curl command not working in ES

**URL:** <https://discuss.elastic.co/t/curl-command-not-working-in-es/41900>\
**Category:** Logstash\
**Created:** [February 16, 2016, 3:14pm UTC](https://discuss.elastic.co/t/curl-command-not-working-in-es/41900 "2016-02-16T15:14:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bubu.senapati](https://avatars.discourse-cdn.com/v4/letter/b/45deac/32.png) [@bubu.senapati](https://discuss.elastic.co/u/bubu.senapati)\
**Post date:** [February 16, 2016, 3:14pm UTC](https://discuss.elastic.co/t/curl-command-not-working-in-es/41900/1 "2016-02-16T15:14:06Z")

</div>

Hi Magnus,  
there is an index in my elastic search which i want to close and subsequently delete.  
The index created is with name falog-%{[time\_stamp]}  
I tried to execute the curl like  
curl -XPOST '[http://localhost:9200/falog-%{[time\_stamp]}/\_close](http://localhost:9200/falog-%25%7B%5Btime_stamp%5D%7D/_close)'  
it gave the error curl: (3) [globbing] nested braces not supported at pos 31

i tried with  
curl -XPOST -g '[http://localhost:9200/falog-%{[time\_stamp]}/\_close](http://localhost:9200/falog-%25%7B%5Btime_stamp%5D%7D/_close)'  
It gave me the error {"error":"IllegalArgumentException[invalid escape sequence `%{[' at index 6 of: falog-%{[time\_stamp]}]","status":500}

Could you please suggest how can i close and hence delete the index.  
Is there any other way i can achieve the end result .

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 16, 2016, 3:23pm UTC](https://discuss.elastic.co/t/curl-command-not-working-in-es/41900/2 "2016-02-16T15:23:54Z")

</div>

Try "%25" instead of "%".

---

<div class="post-metadata">

**Author:** ![bubu.senapati](https://avatars.discourse-cdn.com/v4/letter/b/45deac/32.png) [@bubu.senapati](https://discuss.elastic.co/u/bubu.senapati)\
**Post date:** [February 16, 2016, 3:36pm UTC](https://discuss.elastic.co/t/curl-command-not-working-in-es/41900/3 "2016-02-16T15:36:00Z")

</div>

tried with following command  
curl -XPOST '[http://localhost:9200/falog-%{[time\_stamp]}/\_close](http://localhost:9200/falog-%25%7B%5Btime_stamp%5D%7D/_close)'

but with following error  
curl: (3) [globbing] nested braces not supported at pos 33

---

<div class="post-metadata">

**Author:** ![bubu.senapati](https://avatars.discourse-cdn.com/v4/letter/b/45deac/32.png) [@bubu.senapati](https://discuss.elastic.co/u/bubu.senapati)\
**Post date:** [February 16, 2016, 3:38pm UTC](https://discuss.elastic.co/t/curl-command-not-working-in-es/41900/4 "2016-02-16T15:38:43Z")

</div>

sorry worked wit -g and %25.  
Thanks magnus . You are a great help

---

<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, 5:11am UTC](https://discuss.elastic.co/t/curl-command-not-working-in-es/41900/5 "2017-07-06T05:11:09Z")

</div>


