# Is it ok to use Kibana's saved\_objects optionJSON for custom attributes?

**URL:** <https://discuss.elastic.co/t/is-it-ok-to-use-kibanas-saved-objects-optionjson-for-custom-attributes/273435>\
**Category:** Kibana\
**Created:** [May 19, 2021, 4:36pm UTC](https://discuss.elastic.co/t/is-it-ok-to-use-kibanas-saved-objects-optionjson-for-custom-attributes/273435 "2021-05-19T16:36:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shuber](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shuber/32/88979_2.png) [@shuber](https://discuss.elastic.co/u/shuber)\
**Post date:** [May 19, 2021, 4:36pm UTC](https://discuss.elastic.co/t/is-it-ok-to-use-kibanas-saved-objects-optionjson-for-custom-attributes/273435/1 "2021-05-19T16:36:23Z")

</div>

Hello,

I'm working with Kibana dashboards that I'm embedding in pages. I'd like to add metadata to the dashboards and I noticed there is a structure called optionJSON in the saved\_objects structure for dashboards. Is it possible and ok to add custom attributes in there ? I'm thinking of properly naming them to avoid any potential conflicts.

Also if I do this would it work in future plans for Kibana ? Or are there plans to refactor/rewrite this object structure ?

Regards,  
Serge Huber.

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [May 20, 2021, 7:56pm UTC](https://discuss.elastic.co/t/is-it-ok-to-use-kibanas-saved-objects-optionjson-for-custom-attributes/273435/2 "2021-05-20T19:56:29Z")

</div>

@Pierre_Gayvallet / @joshdover can we please get some help here please?

Thanks  
Bhavya

---

<div class="post-metadata">

**Author:** ![Pierre\_Gayvallet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierre_gayvallet/32/77239_2.png) [@Pierre\_Gayvallet](https://discuss.elastic.co/u/Pierre_Gayvallet)\
**Post date:** [May 25, 2021, 6:32am UTC](https://discuss.elastic.co/t/is-it-ok-to-use-kibanas-saved-objects-optionjson-for-custom-attributes/273435/3 "2021-05-25T06:32:16Z")

</div>

> Is it possible and ok to add custom attributes in there

It is technically possible, and I think it would effectively work today (from a quick look, any migration of dashboard's settings we've done in the past are non-destructive) however I would discourage this as it would be using the underlying data structure for usages it was not conceived for.

> Also if I do this would it work in future plans for Kibana ? Or are there plans to refactor/rewrite this object structure ?

That's the thing. Even if we're not planning any structural model changes for SOs at the moment, we can't guarantee it will never happen, which is why using the underlying SO document structure is not something we are supporting or that we would recommend.

> I'd like to add metadata to the dashboards

FMI, do you mind telling us what kind of metadata you would need to add?

---

<div class="post-metadata">

**Author:** ![shuber](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shuber/32/88979_2.png) [@shuber](https://discuss.elastic.co/u/shuber)\
**Post date:** [May 26, 2021, 8:44am UTC](https://discuss.elastic.co/t/is-it-ok-to-use-kibanas-saved-objects-optionjson-for-custom-attributes/273435/4 "2021-05-26T08:44:35Z")

</div>

Hi Pierre thanks for your answer. The metadata I would like to add is information about dashboard and other external meta information to help embed Kibana dashboards automatically.

For example let's say I have a filter that filters on a field called "domain". This way I could add meta data information about the exact filter and the application embedding the dashboard could know there is a filter on a domain field that could inject a value. Another way of solving this would be to be able to have placeholders for values in filters.

---

<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:** [June 23, 2021, 8:45am UTC](https://discuss.elastic.co/t/is-it-ok-to-use-kibanas-saved-objects-optionjson-for-custom-attributes/273435/5 "2021-06-23T08:45:35Z")

</div>

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