# How to query current cluster shard allocation setting

**URL:** https://discuss.elastic.co/t/how-to-query-current-cluster-shard-allocation-setting/201825
**Category:** Elasticsearch
**Created:** [October 1, 2019, 2:31pm UTC](https://discuss.elastic.co/t/how-to-query-current-cluster-shard-allocation-setting/201825 "2019-10-01T14:31:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![LeeSyd](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@LeeSyd](https://discuss.elastic.co/u/LeeSyd)
#### Post date: [October 1, 2019, 2:31pm UTC](https://discuss.elastic.co/t/how-to-query-current-cluster-shard-allocation-setting/201825/1 "2019-10-01T14:31:43Z")

</div>

I may be doing something stupid. I'm sure I've queried under older versions but can't seem to query through the API or console to determine current cluster shard allocation setting - is anybody able to assist please?

I can enable and disable with a PUT but if I try the console with the following: -  
GET \_cluster/settings  
{  
"persistent": {  
"cluster.routing.allocation.enable"  
}  
}

I get error: -  
{  
"error": "Incorrect HTTP method for uri [/\_cluster/settings?pretty] and method [POST], allowed: [PUT, GET]",  
"status": 405  
}

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [October 1, 2019, 2:46pm UTC](https://discuss.elastic.co/t/how-to-query-current-cluster-shard-allocation-setting/201825/2 "2019-10-01T14:46:54Z")

</div>

You can't run:

```auto
GET _cluster/settings
{
 "persistent": {
  "cluster.routing.allocation.enable"
 }
}

```

You can run:

```auto
GET _cluster/settings

```

What is happening behind the scene of the Dev Console is that anytime you are providing a body with the `GET` http verb, the verb is transformed to `POST`.  
Because browsers don't really support GET with body.

---

<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: [October 29, 2019, 2:46pm UTC](https://discuss.elastic.co/t/how-to-query-current-cluster-shard-allocation-setting/201825/3 "2019-10-29T14:46:54Z")

</div>

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