# Ability to Deep Link to Run Graph Query

**URL:** <https://discuss.elastic.co/t/ability-to-deep-link-to-run-graph-query/139403>\
**Category:** Kibana\
**Tags:** elastic-stack-graph\
**Created:** [July 10, 2018, 5:02pm UTC](https://discuss.elastic.co/t/ability-to-deep-link-to-run-graph-query/139403 "2018-07-10T17:02:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![robert.j.foreman](https://avatars.discourse-cdn.com/v4/letter/r/9fc348/32.png) [@robert.j.foreman](https://discuss.elastic.co/u/robert.j.foreman)\
**Post date:** [July 10, 2018, 5:02pm UTC](https://discuss.elastic.co/t/ability-to-deep-link-to-run-graph-query/139403/1 "2018-07-10T17:02:21Z")

</div>

Is there a way to open the Kibana Graph UI with a URL that includes a query to run so that the UI loads with an initial graph?

The setting a query in the URL works for Discover and Visualize tabs in Kibana, but I can't seem to use that in Graph. Am I doing it wrong?

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [July 10, 2018, 5:23pm UTC](https://discuss.elastic.co/t/ability-to-deep-link-to-run-graph-query/139403/2 "2018-07-10T17:23:58Z")

</div>

> [@robert.j.foreman](#):
>
> The setting a query in the URL works for Discover and Visualize tabs in Kibana, but I can't seem to use that in Graph. Am I doing it wrong?

The way to do that is get the URL for a saved workspace and add a `?query=X` parameter to the url where X is either:

- a plain-text string that uses the regular query\_string syntax (eg `cat OR cats AND food`)
- a JSON string that is any of the regular elasticsearch Query DSL
- a JSON string that uses the Graph API's explore syntax

We auto-detect which of the above you're using.  
Example use case here showing how a risk-scoring algo creates "alert" documents in a task list that contain such hyperlinks for investigators to open risky graphs: [https://youtu.be/liMhiiyQ9co?t=17m4s](https://youtu.be/liMhiiyQ9co?t=17m4s)

---

<div class="post-metadata">

**Author:** ![robert.j.foreman](https://avatars.discourse-cdn.com/v4/letter/r/9fc348/32.png) [@robert.j.foreman](https://discuss.elastic.co/u/robert.j.foreman)\
**Post date:** [July 10, 2018, 7:55pm UTC](https://discuss.elastic.co/t/ability-to-deep-link-to-run-graph-query/139403/3 "2018-07-10T19:55:55Z")

</div>

Thanks Mark, this is great

---

<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:** [August 7, 2018, 7:55pm UTC](https://discuss.elastic.co/t/ability-to-deep-link-to-run-graph-query/139403/4 "2018-08-07T19:55:56Z")

</div>

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