Create visualizations through API call

Verisio: 2.9.0

Is there a way to query the index via API and generate visualization from the result in the dashboards?

You can use saved objects API of OSD to create a visualization: