At the bottom of your visualization there is a small caret that you can click to view more detailed information about the base query:

Then you can click the "Request" button to view the basic request, which you can copy / paste and do whatever suits you.

UPDATE
Then you can copy / paste the request from the "Request" text box and simply paste it into the curl, for example:
curl -XPOST localhost:9200/your_index/your_type/_search -d '{ "query": { "filtered": { "query": { "query_string": { "analyze_wildcard": true, "query": "blablabla AND blablabla" } }, "filter": { "bool": { "must": [ { "range": { "@timestamp": { "gte": 1439762400000, "lte": 1439848799999 } } } ], "must_not": [] } } } }, "highlight": { "pre_tags": [ "@ kibana-highlighted-field@ " ], "post_tags": [ "@/ kibana-highlighted-field@ " ], "fields": { "*": {} } }, "size": 420, "sort": { "@timestamp": "desc" }, "aggs": { "2": { "date_histogram": { "field": "@timestamp", "interval": "30m", "pre_zone": "+02:00", "pre_zone_adjust_large_interval": true, "min_doc_count": 0, "extended_bounds": { "min": 1439762400000, "max": 1439848799999 } } } }, "fields": [ "*", "_source" ], "script_fields": {}, "fielddata_fields": [ "@timestamp" ] }'
You may need to configure several items (e.g. pre and post release tags, etc.)
Val
source share