# Generating short URL to hide filters

**URL:** <https://discuss.elastic.co/t/generating-short-url-to-hide-filters/354198>\
**Category:** Kibana\
**Created:** [February 27, 2024, 9:06am UTC](https://discuss.elastic.co/t/generating-short-url-to-hide-filters/354198 "2024-02-27T09:06:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![skouf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skouf/32/122903_2.png) [@skouf](https://discuss.elastic.co/u/skouf)\
**Post date:** [February 27, 2024, 9:06am UTC](https://discuss.elastic.co/t/generating-short-url-to-hide-filters/354198/1 "2024-02-27T09:06:51Z")

</div>

Hello

We need to transform URL like this

_kibanaUrl_/app/dashboards?auth\_provider\_hint=anonymous1#/view/7adfa750-4c81-11e8-b3d7-01146121b73d?embed=true&\_g=(filters:!(),refreshInterval:(pause:!f,value:0),time:(from:'${selectedStartDate}',to:'${selectedEndDate}'))&hide-time-filter=true

to url like this (this url is generated when you use the Short url option when sharing a dashboard)

_kibanaUrl_/goto/972bcea0-d54e-11ee-9900-c76d34c864a8

It's for iframe url because we don't want that specific filters appears if someone inspects the code of the iframe.

How is it possible to do that ? Is it with the Kibana short URL api ?  
In that case, what is this locator id. I saw many questions regarding this and I still can't figure how to find it easily ☹

Thanks for your help !

---

<div class="post-metadata">

**Author:** ![skouf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skouf/32/122903_2.png) [@skouf](https://discuss.elastic.co/u/skouf)\
**Post date:** [February 28, 2024, 10:38am UTC](https://discuss.elastic.co/t/generating-short-url-to-hide-filters/354198/2 "2024-02-28T10:38:23Z")

</div>

Hello

I finally found my answer. The locator ID is just a simple string with this value : "LEGACY\_SHORT\_URL\_LOCATOR"

with this, I am able to generate short kibana URLs, using the short\_url API, for my iframe, where filters are hidden (not present in the iframe URL)

---

<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:** [March 27, 2024, 10:39am UTC](https://discuss.elastic.co/t/generating-short-url-to-hide-filters/354198/3 "2024-03-27T10:39:02Z")

</div>

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