# Build/Create A URL for Kibana Dashboards/Graphs

**URL:** <https://discuss.elastic.co/t/build-create-a-url-for-kibana-dashboards-graphs/132576>\
**Category:** Kibana\
**Created:** [May 19, 2018, 6:54pm UTC](https://discuss.elastic.co/t/build-create-a-url-for-kibana-dashboards-graphs/132576 "2018-05-19T18:54:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ktvasan](https://avatars.discourse-cdn.com/v4/letter/k/0ea827/32.png) [@ktvasan](https://discuss.elastic.co/u/ktvasan)\
**Post date:** [May 19, 2018, 6:54pm UTC](https://discuss.elastic.co/t/build-create-a-url-for-kibana-dashboards-graphs/132576/1 "2018-05-19T18:54:04Z")

</div>

We are in the process of automating to display the Kibana logs in a Dashboards out of Kibana UI. We are thinking to use Python to pull the critical dashboards/graphs to show in our internal GUI. Is there any way to get the URLs for a Dashboards we are interested? Thanks in Advance. Any examples would be much helpfull.

---

<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:** [May 21, 2018, 12:47pm UTC](https://discuss.elastic.co/t/build-create-a-url-for-kibana-dashboards-graphs/132576/2 "2018-05-21T12:47:09Z")

</div>

Hey @ktvasan, if you'd like to integrate Kibana Dashboards and Visualizations into your own application, I'd recommend using an `iframe`. When you're running Kibana if you click the "Share" button in the upper right corner, you'll get the following dialog which will give you the necessary iframe code to embed the Dashboard/Visualization in your application:

 ![41%20AM](https://us1.discourse-cdn.com/elastic/original/3X/a/b/abc205efa366da7de1367201d9b0b805a8a3d5bb.png)

---

<div class="post-metadata">

**Author:** ![ktvasan](https://avatars.discourse-cdn.com/v4/letter/k/0ea827/32.png) [@ktvasan](https://discuss.elastic.co/u/ktvasan)\
**Post date:** [May 21, 2018, 7:51pm UTC](https://discuss.elastic.co/t/build-create-a-url-for-kibana-dashboards-graphs/132576/3 "2018-05-21T19:51:36Z")

</div>

Hi Brandon. Thanks for the reply.

We are using elastic-search api for Python to query the data and plot the graph in our own application.  
For some reason, the Json data as a body was not posting along with my request URL. I get empty data object. Here is my code and the response.

#!/usr/bin/env python  
import requests  
from elasticsearch import Elasticsearch  
import json

from ssl import create\_default\_context  
cafile="my.perm.pac"

context = create\_default\_context()

url = "[https://mydev-elk.dev1.com/elasticsearch/logstash-browse-access-logs-\*/](https://mydev-elk.dev1.com/elasticsearch/logstash-browse-access-logs-*/)"

data=  
{

"query": {  
"bool": {  
"must": [  
{  
"match\_all": {}  
},  
{  
"range": {  
"log\_timestamp": {  
"gte": 1526916192084,  
"lte": 1526917092084,  
"format": "epoch\_millis"  
}  
}  
}  
],  
"must\_not": []  
}  
},

"size": 0,  
"\_source": {  
"excludes": []  
},

"aggregations": {

```
"2": {
  "date_histogram": {
    "field": "log_timestamp",
    "interval": "5s",
    "time_zone": "America/Chicago",
    "min_doc_count": 1
  }
}

```

}

}

es = Elasticsearch(  
[url],  
http\_auth=(user', 'pass'),  
scheme="https",  
port=443,  
ssl\_context=context,  
)

res = es.search(index="/logstash-browse-access-logs-\*", body=data)

print(res)

I get the following responses,

{'took': 507, 'timed\_out': False, '\_shards': {'total': 152, 'successful': 152, 'skipped': 0, 'failed': 0}, 'hits': {'total': 0, 'max\_score': None, 'hits': []}}

But when I frame the URL and posted in the browser I got all my Json objects.

The below URL I was using Browser and got the response.

[https://mydev-elk.dev1.com/elasticsearch/logstash-browse-access-logs-\*/\_search?source=](https://mydev-elk.dev1.com/elasticsearch/logstash-browse-access-logs-*/_search?source=)  
{  
"query": {  
"bool": {  
"must": [  
{  
"match\_all": {}  
},  
{  
"range": {  
"log\_timestamp": {  
"gte": 1526916192084,  
"lte": 1526917092084,  
"format": "epoch\_millis"  
}  
}  
}  
],  
"must\_not": []  
}  
},

"size": 0,  
"\_source": {  
"excludes": []  
},

"aggregations": {

```
"2": {
  "date_histogram": {
    "field": "log_timestamp",
    "interval": "5s",
    "time_zone": "America/Chicago",
    "min_doc_count": 1
  }
}

```

}

}

Any idea what am I missing..

---

<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:** [May 21, 2018, 8:12pm UTC](https://discuss.elastic.co/t/build-create-a-url-for-kibana-dashboards-graphs/132576/4 "2018-05-21T20:12:35Z")

</div>

Hey @ktvasan, nothing jumps out immediately as something you're doing wrong, but I'm not a python client expert.

---

<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:** [June 18, 2018, 8:12pm UTC](https://discuss.elastic.co/t/build-create-a-url-for-kibana-dashboards-graphs/132576/5 "2018-06-18T20:12:41Z")

</div>

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