Is there a way to create a dashboard and visualization via Kibana REST API in version 8.15.3?

Is there a direct way to create a dashboard and visualization in Kibana using REST API? If not, why is that? If there is, could you give me an example please? Also, is there a way to fetch dashboard ids from Kibana using REST API as well?

Welcome!

Have a look at:

This might help.

Hey @dadoonet thanks for your reply. But won't this solution require me to manually create a dashboard and visualization first and then export and import that? Is there a way to make this whole thing automatic?

Check this old post, it mentions about using the Create Saved Object API from Kibana to create Visualizations.

But a couple of things:

  • There is no documentation on how to create visualizations/dashboards using the API, you would need to test yourself, basically exporting some visualizations and trying to replicate it.
  • The API is deprecated and will likely be gone in some next release.

Yes, exactly! I did try that endpoint and I have seen it working, but the depreciation is avoiding me from using it. I hope we get something like that in the current API version which isn't deprecated.