Is it ok to use Kibana's saved_objects optionJSON for custom attributes?

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.

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

Thanks
Bhavya

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?

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.

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