# Change advanced settings via API?

**URL:** <https://discuss.elastic.co/t/change-advanced-settings-via-api/289205>\
**Category:** Kibana\
**Created:** [November 15, 2021, 2:02pm UTC](https://discuss.elastic.co/t/change-advanced-settings-via-api/289205 "2021-11-15T14:02:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![TimWardFS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timwardfs/32/65108_2.png) [@TimWardFS](https://discuss.elastic.co/u/TimWardFS)\
**Post date:** [November 15, 2021, 2:02pm UTC](https://discuss.elastic.co/t/change-advanced-settings-via-api/289205/1 "2021-11-15T14:02:25Z")

</div>

I can't see how to change an advanced setting via the API. If I use `/api/saved_objects/_bulk_create` and _don't_ use `overwrite` then I get a 409 conflict failure, and if I _do_ use `overwrite` then it appears that the entire set of advanced settings gets overwritten, not just the one I want to change.

Different way of asking the same question: How, using an API, do I set `filters:pinnedByDefault` to `true` without disturbing any other advanced settings there might be?

---

<div class="post-metadata">

**Author:** ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)\
**Post date:** [November 16, 2021, 12:13pm UTC](https://discuss.elastic.co/t/change-advanced-settings-via-api/289205/2 "2021-11-16T12:13:13Z")

</div>

Hello Tim,

I think the only correct way for now is to call the API and read the current settings, update your setting and upload it again.

Best regards,  
Wolfram

---

<div class="post-metadata">

**Author:** ![TimWardFS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timwardfs/32/65108_2.png) [@TimWardFS](https://discuss.elastic.co/u/TimWardFS)\
**Post date:** [November 16, 2021, 12:35pm UTC](https://discuss.elastic.co/t/change-advanced-settings-via-api/289205/3 "2021-11-16T12:35:04Z")

</div>

Yeah, I was afraid of that, ta. Obvs this is possible to do from where I currently could put a curl command, a shell script running in an init container at installation time, but I might decide that it's so tedious to do that I don't bother.

---

<div class="post-metadata">

**Author:** ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)\
**Post date:** [November 16, 2021, 12:40pm UTC](https://discuss.elastic.co/t/change-advanced-settings-via-api/289205/4 "2021-11-16T12:40:12Z")

</div>

I stumbled over this issue [here](https://github.com/elastic/kibana/issues/14873) which describes the **inofficial** way to that:

```auto
POST http://localhost:5601/api/kibana/settings
{"changes":{"defaultIndex":"logstash-*"}}

```

The downside is that this is undocumented and may be changed as this is a Kibana internal API

---

<div class="post-metadata">

**Author:** ![TimWardFS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timwardfs/32/65108_2.png) [@TimWardFS](https://discuss.elastic.co/u/TimWardFS)\
**Post date:** [November 16, 2021, 1:02pm UTC](https://discuss.elastic.co/t/change-advanced-settings-via-api/289205/5 "2021-11-16T13:02:30Z")

</div>

Ta. Yes, I found that eventually, but I think I'm deciding that I'm not desperate enough for that! - I'd rather do without the feature I'm thinking of implementing than leave a time bomb like that for a future maintainer.

---

<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:** [December 14, 2021, 1:02pm UTC](https://discuss.elastic.co/t/change-advanced-settings-via-api/289205/6 "2021-12-14T13:02:42Z")

</div>

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