# Visualisation / json request to view data

**URL:** https://discuss.elastic.co/t/visualisation-json-request-to-view-data/37918
**Category:** Kibana
**Created:** [December 24, 2015, 7:48am UTC](https://discuss.elastic.co/t/visualisation-json-request-to-view-data/37918 "2015-12-24T07:48:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![smm](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@smm](https://discuss.elastic.co/u/smm)
#### Post date: [December 24, 2015, 7:48am UTC](https://discuss.elastic.co/t/visualisation-json-request-to-view-data/37918/1 "2015-12-24T07:48:25Z")

</div>

Hello Community,

if I want to do this:  
**display the raw data behind the visualization, clicking the bar at the bottom of the container**  
and in order to achieve this then take a look at the **request tab** (please see example - I made a copy and paste of a sample request).

My question is: How do I 'use' this request? How does it look like to actually use this raw request to query the server? With xget? Please give me a short example.

The idea behind is to use this request in some scripts in order to query elasticsearch from there.  
Thank you for your help!!!

Here is an example of a request:  
{  
"size": 0,  
"aggs": {  
"2": {  
"terms": {  
"field": "timestamp",  
"size": 5,  
"order": {  
"\_count": "desc"  
}  
}  
}  
},  
"query": {  
"filtered": {  
"query": {  
"query\_string": {  
"analyze\_wildcard": true,  
"query": "_"  
}  
},  
"filter": {  
"bool": {  
"must": [  
{  
"query": {  
"match": {  
"host": {  
"query": "ubuntu64",  
"type": "phrase"  
}  
}  
}  
},  
{  
"query": {  
"query\_string": {  
"analyze\_wildcard": true,  
"query": "_"  
}  
}  
},  
{  
"range": {  
"timestamp": {  
"gte": 1450937938662,  
"lte": 1450941538663  
}  
}  
}  
],  
"must\_not": []  
}  
}  
}  
},  
"highlight": {  
"pre\_tags": [  
"@kibana-highlighted-field@"  
],  
"post\_tags": [  
"@/kibana-highlighted-field@"  
],  
"fields": {  
"\*": {}  
},  
"fragment\_size": 2147483647  
}  
}

---

<div class="post-metadata">

### Author: ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)
#### Post date: [December 24, 2015, 8:47am UTC](https://discuss.elastic.co/t/visualisation-json-request-to-view-data/37918/2 "2015-12-24T08:47:31Z")

</div>

You can use the given body inside any Elasticsearch request context that uses a query. An example would be `_search`:

`POST http://localhost:9200/<index>/[<type>]/_search { (request body here) }`

---

<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: [July 6, 2017, 2:06pm UTC](https://discuss.elastic.co/t/visualisation-json-request-to-view-data/37918/3 "2017-07-06T14:06:04Z")

</div>


