# Set default index with curl command - Error from Elastic

**URL:** <https://discuss.elastic.co/t/set-default-index-with-curl-command-error-from-elastic/221044>\
**Category:** Elasticsearch\
**Created:** [February 26, 2020, 1:06pm UTC](https://discuss.elastic.co/t/set-default-index-with-curl-command-error-from-elastic/221044 "2020-02-26T13:06:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Voula\_Mikr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voula_mikr/32/58451_2.png) [@Voula\_Mikr](https://discuss.elastic.co/u/Voula_Mikr)\
**Post date:** [February 26, 2020, 1:06pm UTC](https://discuss.elastic.co/t/set-default-index-with-curl-command-error-from-elastic/221044/1 "2020-02-26T13:06:49Z")

</div>

Hi,

I am using Elasticsearch 7.0.1 and I am trying to set an index as default with the below command:

curl '_ **ip** _\_:5601/api/kibana/settings'   
-H 'kbn-version: 7.0.1'   
-H 'Content-Type: application/json'   
--data-binary '{"changes":{"defaultIndex":"979390d0-3def-11ea-ad1f-5b09c073c7d3"}}'   
--compressed

and I get :  
{"message":"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];: [cluster\_block\_exception] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];","statusCode":403,"error":"Forbidden"}

I read this

> [@"cluster\_block\_exception", "reason"=\>"blocked by: \[FORBIDDEN/12/index read-only / allow delete (api)\];"})](https://discuss.elastic.co/t/cluster-block-exception-reason-blocked-by-forbidden-12-index-read-only-allow-delete-api/162449):
>
> it looks like I ran out of space. I free up some space by deleted bunch of unneeded indices and docs. ... yet still keep getting following error: logstash | [2018-12-30T15:38:10,978][INFO][logstash.outputs.elasticsearch] retrying failed action with response code: 403 ({"type"=\>"cluster\_block\_exception", "reason"=\>"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"}) I even tried running following query as well PUT /\_settings { "index": { "blocks": { "read\_only\_a…

but there is only :  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/0/d0fe87404681b323a37d3247278704ac9c8ab8b4.png)

I tried this :

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/d/0d5d52c04c088d613a1542724e1c7ecb65f65fbb.png)  
but with no result.

Could you please help with this?  
Thank you in advance!

---

<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:** [March 25, 2020, 1:06pm UTC](https://discuss.elastic.co/t/set-default-index-with-curl-command-error-from-elastic/221044/2 "2020-03-25T13:06:50Z")

</div>

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