Passing extra parameter in shared iframe

I'd like to use timelion or a visualization on my own web app page... I know I can use Share and produce an IFRAME.

Is it possible to pass extra parameters to the iframe?

For example, I have some data for a few countries. I want user to click on my own buttons for country on my web page so Kibana give me all data only for the chosen country.

I see that the IFRAME has the Time Range in parameters (but the Time Range chosen isn't on the graph itself). Can extra perimeters be added? like an Add Filter.

For timelion graph, can I pass in an timelion expression in URL and have it generate a graph? (instead of do it inside kibana then share iframe)

If you are embedding a Kibana dashboard, you can use the new filter elements on that dashboard to get the functionality you want. Even if the dashboard just has that and a single visualization, that should give you the functionality you're looking for.

If you're trying to use external tools, the only "API" available there is the URL. If you make changes to your visualization and check the URL, you'll see that it is updated to reflect a lot of the changes (time range, filters, the selected sheet, the expression of the selected sheet...), and changing the URL will cause the content to update, so if you externally change the URL of the iframe, you can cause the visualization to update that way. This is basically what you've already described.

I see that the IFRAME has the Time Range in parameters (but the Time Range chosen isn't on the graph itself). Can extra perimeters be added? like an Add Filter.

Yes. To see the syntax, add a filter in Kibana and see what URL it produces. It's basically just an object that is RISON encoded. Should you need to RISON encode your own object, you can use rison-node, the same library Kibana uses.

For timelion graph, can I pass in an timelion expression in URL and have it generate a graph? (instead of do it inside kibana then share iframe)

Sure can!

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