# Dynamically getting iframe code Kibana Dashboard

**URL:** <https://discuss.elastic.co/t/dynamically-getting-iframe-code-kibana-dashboard/155857>\
**Category:** Kibana\
**Created:** [November 8, 2018, 9:57am UTC](https://discuss.elastic.co/t/dynamically-getting-iframe-code-kibana-dashboard/155857 "2018-11-08T09:57:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mackmilan\_Selva](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@Mackmilan\_Selva](https://discuss.elastic.co/u/Mackmilan_Selva)\
**Post date:** [November 8, 2018, 9:57am UTC](https://discuss.elastic.co/t/dynamically-getting-iframe-code-kibana-dashboard/155857/1 "2018-11-08T09:57:40Z")

</div>

Hi, in Kibana, users are able to get the embedded iframe code in their dashboards. I was wondering if there's an API that allows me to dynamically get the iframe codes without having to open kibana and manually copy the codes every time?

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [November 8, 2018, 6:18pm UTC](https://discuss.elastic.co/t/dynamically-getting-iframe-code-kibana-dashboard/155857/2 "2018-11-08T18:18:19Z")

</div>

There's not an API or programatic way, no. However, the format in the URL is predictable, and the global state (data in the `_g` query param) and app state (the `_a` param) can be used to control what you see in the iframe.

For example, if I add `extension:jpg` in the query bar, I'll see it reflected in the app state parm as `query:(language:lucene,query:'extension:jpg')`. This is JSON data that is rison encoded. You can read more about how that works in [the library's readme](https://www.npmjs.com/package/rison-node).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 6, 2018, 6:18pm UTC](https://discuss.elastic.co/t/dynamically-getting-iframe-code-kibana-dashboard/155857/3 "2018-12-06T18:18:34Z")

</div>

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