-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REST API to get the visualization request #3580
Comments
Hi, I did exactly the same. Copy the content of the request and put in a web request like so: curl -XGET http://localhost:9200/<index_name>/_search http://localhost:9200/%3Cindex_name%3E/_search -d ‘’ Does this make sense? #ELK_AWESOME
|
@bruskiza Thanks, but that's exactly what I want to avoid: manually copying and pasting. I want to directly query Kibana programmatically (via REST API) to get the ES request body. |
Locating the visualisation is always a challenge for me. The Kibana items are actually contained as documents in the kibana index themselves. http:/localhost:9200/.kibana/_search?pretty http://gosalyn.isignite.co.za:9200/.kibana/_search?pretty The _id of this index gives clues as to their queries. and the query field should give you the field you are after. Not so? Regards
|
Given the above visualization screeny, when I find that in
, which is not the exact Elasticsearch request body that is provided in the GUI. It's very different than what's given in the Kibana GUI:
|
currently there is no API for this. Adding as a feature request |
+1 |
I would like to implement this. Can someone point me in the right direction? |
It looks like in |
@timmolter Any updates? Regards |
I ended up querying the .kibana ES index directly and parsing the dashboard. It's not very elegant. I hope someone creates a nice API. Sent from my iPhone
|
I am also interested in this. Kibana seems like an awesome tool and would be great to have it in the backend and programaticcaly query dashboards/visualizations trough ajax somehow. |
@timmolter @luckycse can share how to get the visualisation data? |
Hi. No problem. I ended up querying the So as far as I can tell, forget about querying the Kibana webservice directly via some HTTP REST endpoint. Go directly to the Elasticsearch index and grab the (hidden) |
@timmolter, thanks! |
as far as I know creating the index itself need to be manually |
Hi, |
Using firebug it was possible to get request used in Kibana 4.1.1 UI. However not all data could be retrived. Replace /dashboard by /search or /visualization to get respective data. In all cases only first 10 objects were returned. Any Idea how to get next objects or all of them in a go? |
Now it |
This is work fine POST header must be: And in POST message: |
Any updates on this |
+1 |
1 similar comment
+1 |
+1 |
There is an API to do this in more recent versions of Kibana, and we just documented this here: https://www.elastic.co/guide/en/kibana/master/saved-objects-api-get.html |
There seem to have been mixed up a couple of requests in this issue already. Exporting and importing visualizations/dashboards (not the request behind it) This can be done via the above mentioned API already. Getting the request a visualization does manually This can be done via the Inspector for all requests of a visualization or in Discover. Getting the request a visualization did to gather data via a REST API (the original issue) We discussed that feature recently, and although it is a legit feature request, we decided, that that kind of Rest API might not be something that makes sense for a broader audience and there are also some technical limitations. Already today a visualization is not necessarily created from a single Elasticsearch request, but can be created from multiple requests, meaning that REST API would not be able to return a single request body, that you can send, but potentially a series of request bodies. In what way those are combined together to make up the visualization is internal to the Kibana code, and thus just knowing the requests, doesn't necessarily give you the capabilities to from the same response. That will become even more tricky in the future, since we are currently switching over to use the Canvas expressions for all visualizations in Kibana (see #19813). That way you can have an arbitrary amount of functions in your expression, that will cause requests, and potentially combine them in any flexible way you want. Some of the requests might not even need to be represented in the final visualization at all anymore, but could also just be used to e.g. find out axis extends. That's why we decided not to build a REST API around that, and closing this issue. This of course doesn't influence anyhow what JavaScript APIs are and will be available to plugin authors, e.g. to gather more insights into the expression being send from a panel action or similar. |
I'd like to be able to query the Kibana web application and get the Elasticsearch request bodies used to build all the visualizations on a given dashboard. See screeny:
Is this possible?
The text was updated successfully, but these errors were encountered: