# How to update only a single setting in cluster settings?

**URL:** <https://discuss.elastic.co/t/how-to-update-only-a-single-setting-in-cluster-settings/372810>\
**Category:** Elasticsearch\
**Created:** [January 5, 2025, 2:28pm UTC](https://discuss.elastic.co/t/how-to-update-only-a-single-setting-in-cluster-settings/372810 "2025-01-05T14:28:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard\_Zhang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richard_zhang/32/140473_2.png) [@Richard\_Zhang](https://discuss.elastic.co/u/Richard_Zhang)\
**Post date:** [January 5, 2025, 2:28pm UTC](https://discuss.elastic.co/t/how-to-update-only-a-single-setting-in-cluster-settings/372810/1 "2025-01-05T14:28:50Z")

</div>

Hi everyone,

this page says we can update cluster settings with a PUT request, like below

```auto
PUT /_cluster/settings
{
  "persistent" : {
    "indices.recovery.max_bytes_per_sec" : "50mb"
  }
}

```

[link to the page](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html#cluster-update-settings-api-request)

Since it's PUT request, does it mean we have to pass all the settings in the request even we just need change a single value? That's not reasonable and risky for production.

How can we only update a single setting value? Thanks.

---

<div class="post-metadata">

**Author:** ![Musab\_Dogan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/musab_dogan/32/70691_2.png) [@Musab\_Dogan](https://discuss.elastic.co/u/Musab_Dogan)\
**Post date:** [January 5, 2025, 3:18pm UTC](https://discuss.elastic.co/t/how-to-update-only-a-single-setting-in-cluster-settings/372810/2 "2025-01-05T15:18:17Z")

</div>

When you send PUT request it will only update the settings that you write in the query body. Others will be remain untouched.

If you would like to reset more than one value you can use wildcards.

---

<div class="post-metadata">

**Author:** ![Richard\_Zhang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richard_zhang/32/140473_2.png) [@Richard\_Zhang](https://discuss.elastic.co/u/Richard_Zhang)\
**Post date:** [January 6, 2025, 2:59pm UTC](https://discuss.elastic.co/t/how-to-update-only-a-single-setting-in-cluster-settings/372810/3 "2025-01-06T14:59:58Z")

</div>

Thank you Musab for the quick response.

I think it's just the answer I was looking for!! Appreciate it.

Although we might not be able to change it, I really want to say it's not correct for this API to be PUT when it actually only update **parts** of the settings instead of the **entire** set of settings. It should be a **PATCH** request instead. (I will be happy if more developers/ES users see this post and agree with me on this ^\_^)

I second this statement about the purpose of PUT method.

> A [PUT request] is used to update an entire resource on the server. When you use a PUT request, you are telling the server to completely replace the existing data with the new data you provide.

(hyperlink is not allowed here, but everyone can google it in seconds~)
