# Kibana saved objects index pattern update API

**URL:** <https://discuss.elastic.co/t/kibana-saved-objects-index-pattern-update-api/301793>\
**Category:** Kibana\
**Created:** [April 6, 2022, 6:42pm UTC](https://discuss.elastic.co/t/kibana-saved-objects-index-pattern-update-api/301793 "2022-04-06T18:42:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![uncleAlbert](https://avatars.discourse-cdn.com/v4/letter/u/87869e/32.png) [@uncleAlbert](https://discuss.elastic.co/u/uncleAlbert)\
**Post date:** [April 6, 2022, 6:42pm UTC](https://discuss.elastic.co/t/kibana-saved-objects-index-pattern-update-api/301793/1 "2022-04-06T18:42:18Z")

</div>

Hello,

I see [here](https://discuss.elastic.co/t/api-for-creating-scripted-fields/139236) the correct way to upload a new scripted field to an index pattern in Kibana.

If I want to update a scripted field, can I append to the index pattern `attributes.field`? Will this overwrite the current scripted field with the same name or do I need to parse through the JSON array, pull out the field I care about, update the `script` section of the field, reserialize and post to the update API?

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [April 7, 2022, 7:49am UTC](https://discuss.elastic.co/t/kibana-saved-objects-index-pattern-update-api/301793/2 "2022-04-07T07:49:37Z")

</div>

If you are on a recent version of Kibana you could use runtime fields and the specialized api for this use case: [Upsert runtime field API | Kibana Guide [8.1] | Elastic](https://www.elastic.co/guide/en/kibana/current/data-views-runtime-field-api-upsert.html)

---

<div class="post-metadata">

**Author:** ![uncleAlbert](https://avatars.discourse-cdn.com/v4/letter/u/87869e/32.png) [@uncleAlbert](https://discuss.elastic.co/u/uncleAlbert)\
**Post date:** [April 7, 2022, 12:39pm UTC](https://discuss.elastic.co/t/kibana-saved-objects-index-pattern-update-api/301793/3 "2022-04-07T12:39:42Z")

</div>

What versions of Kibana support runtime fields?

---

<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:** [May 5, 2022, 12:40pm UTC](https://discuss.elastic.co/t/kibana-saved-objects-index-pattern-update-api/301793/4 "2022-05-05T12:40:24Z")

</div>

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