Cant set action.auto_create_index to false


#1

I try

PUT /_all/_settings 
{
  "action.auto_create_index": false
}

and I get this resposne

{
  "error": {
    "root_cause": [
      {
        "type": "cluster_block_exception",
        "reason": "blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"
      }
    ],
    "type": "cluster_block_exception",
    "reason": "blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"
  },
  "status": 403
}

Then i tried

PUT _settings
{
  "index": {
    "blocks": {
      "read_only_allow_delete": "true"
    }
  }
}

Result of above

{
  "acknowledged": true
}

But that didnt change the success of the very first query


#2

Found the issue i need to put the _all before _settings in the path then it works

PUT _all/_settings
{
  "index": {
    "blocks": {
      "read_only_allow_delete": "true"
    }
  }
}