# Setting read\_only\_allow\_delete to false using cURL

**URL:** <https://discuss.elastic.co/t/setting-read-only-allow-delete-to-false-using-curl/115271>\
**Category:** Elasticsearch\
**Created:** [January 12, 2018, 10:26am UTC](https://discuss.elastic.co/t/setting-read-only-allow-delete-to-false-using-curl/115271 "2018-01-12T10:26:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amouzigh\_Driss](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amouzigh_driss/32/25868_2.png) [@Amouzigh\_Driss](https://discuss.elastic.co/u/Amouzigh_Driss)\
**Post date:** [January 12, 2018, 10:26am UTC](https://discuss.elastic.co/t/setting-read-only-allow-delete-to-false-using-curl/115271/1 "2018-01-12T10:26:47Z")

</div>

Hello,

I'm trying to use cURL command in order to set the parameter read\_only\_allow\_delete to false.  
I have cURL errors (either ' is not expected, or cannot resolved or unmatched close brace/bracked).

I tried all these commands:  
curl -XPUT "[http://localhost:9200/myIndex/\_settings](http://localhost:9200/myIndex/_settings)" -d '{"index":{"blocks":{"read\_only\_allow\_delete":false}}}' -H "Content-Type: application/json" --user elasticUser:elasticPwd  
curl -XPUT "[http://localhost:9200/myIndex/\_settings](http://localhost:9200/myIndex/_settings)" -d '{"index":{"blocks.read\_only\_allow\_delete":false} } ' -H "Content-Type: application/json" --user elasticUser:elasticPwd  
curl -XPUT "[http://localhost:9200/myIndex/\_settings](http://localhost:9200/myIndex/_settings)" -d '{"index.blocks.read\_only\_allow\_delete":false}' -H "Content-Type: application/json" --user elasticUser:elasticPwd  
curl -XPUT "[http://localhost:9200/myIndex/\_settings](http://localhost:9200/myIndex/_settings)" -d '{"index.blocks.read\_only\_allow\_delete":null}' -H "Content-Type: application/json" --user elasticUser:elasticPwd  
curl -XPUT "[http://localhost:9200/myIndex/\_settings](http://localhost:9200/myIndex/_settings)" -H "Content-Type: application/json" -d '{ "index.blocks.read\_only\_allow\_delete" : false }' --user elasticUser:elasticPwd

Thank you for your 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:** [February 9, 2018, 10:27am UTC](https://discuss.elastic.co/t/setting-read-only-allow-delete-to-false-using-curl/115271/2 "2018-02-09T10:27:00Z")

</div>

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