Get dashboard relationships kibana via API

Hello!

is there any option to keep dashboard relationships via api ??

i know how to do it via this button...

image

but not how to doi it via api.

Thanks in advanced!

The response from the API gets a references array with all the relationships. Is that what you mean?

So for example from one of the sample dashboards relationships

If I query the get API and format the references objects, I get the same map, lens, index patterns, and so on:

Does this help?

that can only be done via curl in terminal. would there be a way from the dev tools ?

Any http client should be OK, just adapt the request to your environment.

when i try that on dev tools it says:

 "type" : "index_not_found_exception",
 "reason" : "no such index [api]",

I know it's a lot to ask but could you pass me the syntax to execute via dev tools ?

Thank you so much for the help !

Sorry I did not get that you were referring to the Kibana DevTools Console.

Support for querying Kibana APIs just landed in 8.3, so you'd need to upgrade to query them.