title: Running queries created by Kibana using Java API?
body: <p>Is it feasible to run queries created by Kibana using Java API?
  I mean get a ready queries from Kibana dashboards that are created by users dynamically, and pass it like a parameter in Java ?</p>
  
  <p>this is an example of a query  coming from Kibana dashboards : </p>
  
  <pre><code>{
   "size": 0,
   "query": {
   "filtered": {
    "query": {
      "query_string": {
        "analyze_wildcard": true,
        "query": "*"
      }
    },
    "filter": {
      "bool": {
        "must": [
          {
            "range": {
              "@timestamp": {
                "gte": 1274879129857,
                "lte": 1432645529858
                    }
                  }
                }
              ],
            "must_not": []
          }
         }
       }
   },
     "aggs": {
      "3": {
      "terms": {
      "field": "ruleid",
      "size": 20,
      "order": {
        "_count": "desc"
          }
        }
      }
    }
  }
  </code></pre>