# Using external Json-Queries in Kibana-Console with load\_from

**URL:** <https://discuss.elastic.co/t/using-external-json-queries-in-kibana-console-with-load-from/78585>\
**Category:** Kibana\
**Created:** [March 14, 2017, 7:29pm UTC](https://discuss.elastic.co/t/using-external-json-queries-in-kibana-console-with-load-from/78585 "2017-03-14T19:29:27Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![mos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mos/32/4898_2.png) [@mos](https://discuss.elastic.co/u/mos)\
**Post date:** [March 14, 2017, 7:29pm UTC](https://discuss.elastic.co/t/using-external-json-queries-in-kibana-console-with-load-from/78585/1 "2017-03-14T19:29:27Z")

</div>

Hello,

I have a hard time to get the "load\_from" parameter working?!

My call:

[http://localhost:5601/app/kibana#/dev\_tools/console?load\_from=http://localhost:8090/myApplication/elasticQuery.json](http://localhost:5601/app/kibana#/dev_tools/console?load_from=http://localhost:8090/myApplication/elasticQuery.json)

My Kibana-Console (DevTools) opens in the browser. But the script in "elasticQuery.json" is not loaded. It exists and is also from doc-type "application/json". I have no idea whats going wrong....

When referring a json from the Elastic-Doc it works. For example:  
[http://localhost:5601/app/kibana#/dev\_tools/console?load\_from=https://www.elastic.co/guide/en/elasticsearch/reference/current/snippets/query-dsl-term-query/1.json](http://localhost:5601/app/kibana#/dev_tools/console?load_from=https://www.elastic.co/guide/en/elasticsearch/reference/current/snippets/query-dsl-term-query/1.json)

Any idea what's going wrong?  
Can I enable a logging somewhere to see what's going wrong?

Thanks  
Mos

---

<div class="post-metadata">

**Author:** ![mos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mos/32/4898_2.png) [@mos](https://discuss.elastic.co/u/mos)\
**Post date:** [March 15, 2017, 12:12pm UTC](https://discuss.elastic.co/t/using-external-json-queries-in-kibana-console-with-load-from/78585/2 "2017-03-15T12:12:25Z")

</div>

anyone?

---

<div class="post-metadata">

**Author:** ![mos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mos/32/4898_2.png) [@mos](https://discuss.elastic.co/u/mos)\
**Post date:** [March 15, 2017, 3:22pm UTC](https://discuss.elastic.co/t/using-external-json-queries-in-kibana-console-with-load-from/78585/3 "2017-03-15T15:22:10Z")

</div>

Note: Also with `logging.verbose: true` there is no indication, why the "load\_from" content is not loaded into the Kibana Console?

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [March 16, 2017, 11:35am UTC](https://discuss.elastic.co/t/using-external-json-queries-in-kibana-console-with-load-from/78585/4 "2017-03-16T11:35:21Z")

</div>

@mos Console will currently only load scripts when they're served over [https](https://github.com/elastic/kibana/blob/master/src/core_plugins/console/public/src/app.js#L32)

---

<div class="post-metadata">

**Author:** ![mos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mos/32/4898_2.png) [@mos](https://discuss.elastic.co/u/mos)\
**Post date:** [March 16, 2017, 12:08pm UTC](https://discuss.elastic.co/t/using-external-json-queries-in-kibana-console-with-load-from/78585/5 "2017-03-16T12:08:16Z")

</div>

Hi Brandon,

I tested this also. Doesn't work. For example - try to load this via load\_from:

[https://www.jobpushy.de/weblog/parseElasticCommands/1.json](https://www.jobpushy.de/weblog/parseElasticCommands/1.json)

In load\_from parameter:

[http://localhost:5601/app/kibana#/dev\_tools/console?load\_from=https://www.jobpushy.de/weblog/parseElasticCommands/1.json](http://localhost:5601/app/kibana#/dev_tools/console?load_from=https://www.jobpushy.de/weblog/parseElasticCommands/1.json)

Thanks  
Mos

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [March 16, 2017, 4:13pm UTC](https://discuss.elastic.co/t/using-external-json-queries-in-kibana-console-with-load-from/78585/6 "2017-03-16T16:13:08Z")

</div>

> [@mos](#):
>
> [http://localhost:5601/app/kibana#/dev\_tools/console?load\_from=https://www.jobpushy.de/weblog/parseElasticCommands/1.json](http://localhost:5601/app/kibana#/dev_tools/console?load_from=https://www.jobpushy.de/weblog/parseElasticCommands/1.json)

The following error is preventing Kibana from loading the script: `No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:5601' is therefore not allowed access.`

The server hosting the .json file must provide certain headers allowing us load the file. This is part of CORS, further explained here: [Cross-Origin Resource Sharing (CORS) - HTTP | MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS)

---

<div class="post-metadata">

**Author:** ![mos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mos/32/4898_2.png) [@mos](https://discuss.elastic.co/u/mos)\
**Post date:** [March 16, 2017, 4:59pm UTC](https://discuss.elastic.co/t/using-external-json-queries-in-kibana-console-with-load-from/78585/7 "2017-03-16T16:59:36Z")

</div>

Thanks, Brandon.  
How did you have been able to see the log-entry?

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [March 16, 2017, 5:14pm UTC](https://discuss.elastic.co/t/using-external-json-queries-in-kibana-console-with-load-from/78585/8 "2017-03-16T17:14:47Z")

</div>

@mos it was in the Console of the Developer Tools. If you're using Google Chrome, you can right click and select "Inspect Element" which will then show you the Developer Tools. Other browsers have something similar, if you aren't using Google Chrome and you are having issues finding the console logs, if you let me know which browser you're using I can walk you through the process.

---

<div class="post-metadata">

**Author:** ![mos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mos/32/4898_2.png) [@mos](https://discuss.elastic.co/u/mos)\
**Post date:** [March 16, 2017, 5:50pm UTC](https://discuss.elastic.co/t/using-external-json-queries-in-kibana-console-with-load-from/78585/9 "2017-03-16T17:50:57Z")

</div>

Thanks! Problem solved 🙂

---

<div class="post-metadata">

**Author:** ![mos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mos/32/4898_2.png) [@mos](https://discuss.elastic.co/u/mos)\
**Post date:** [March 27, 2017, 6:07am UTC](https://discuss.elastic.co/t/using-external-json-queries-in-kibana-console-with-load-from/78585/10 "2017-03-27T06:07:20Z")

</div>

Works like a charm. Try it at the bottom of the page by clicking on the Kibana image:

> **[Exploring an Elasticsearch-Cluster](https://www.jobpushy.de/blog/12/exploring-an-elasticsearch-cluster)**
>
> A quick reference for the most important commands examining an Elasticsearch installation | Our service Jobpushy is heavily based on the great Elasticsearch...

(by the way, it works also for non https connections...)

---

<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:** [April 24, 2017, 6:07am UTC](https://discuss.elastic.co/t/using-external-json-queries-in-kibana-console-with-load-from/78585/11 "2017-04-24T06:07:29Z")

</div>

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