How to fetch kibana Visualisation data to Powershell automation

Continuing the discussion from Get data from visualize/ dashboard using the API:

I tried to get data from visualization present in Dashboard but I am able to navigate till saved objects of visualizatin with its id but data seems to be meta. Tried possibilities to identify api for this meta like " http://172.33.44.555:3451/s/prod/api/saved-objects/visualiztaion/index-pattern/ with Post and query as data in Requests tab.
But it throws 404 error can anyone please suggest which is right api to get data.
If at least I am able to fetch one visualization data I need to repeat same for all visualizations in Dashboard, if any other feasible way to achieve will be grateful to be known

Hi @Sahithi_V

if I understood correctly your question, you are attempting to retrieve visualization data from all the visualizations in a dashboard uniquely via API? Is that correct?

If that is the correct interpretation I think you cannot do it programmatically via the saved_objects, but as pointed out in the linked comment you need to either use the specific Request for each visualization (you can find them in the Inspector panel as save them) or via some third party plugin.

Thanks Marco for the information but I already had details of query that collects visual data from Inspection Panel. It worked as expected in Kibana Console like
<index-patternname>/_search {
qry
}
but equivalent query when tried Powershell/Python it throwed me the error 404.
URL in PS:
Invoke-webrequest -Method 'POST' -URI "http:/172.22.333.44:3401/ <indexpattername> /_search" -body $body -contenttype "application/json"
Am I declaring correct api or it should contain any namespaces? which is not sure any inputs will be greatly appreciated

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