# Showing query parameters in DSL query results

**URL:** https://discuss.elastic.co/t/showing-query-parameters-in-dsl-query-results/345758
**Category:** Elasticsearch
**Created:** [October 25, 2023, 5:25pm UTC](https://discuss.elastic.co/t/showing-query-parameters-in-dsl-query-results/345758 "2023-10-25T17:25:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![bgyomorei\_c](https://avatars.discourse-cdn.com/v4/letter/b/ad7895/32.png) [@bgyomorei\_c](https://discuss.elastic.co/u/bgyomorei_c)
#### Post date: [October 25, 2023, 5:25pm UTC](https://discuss.elastic.co/t/showing-query-parameters-in-dsl-query-results/345758/1 "2023-10-25T17:25:20Z")

</div>

Let's take the DSL query example below. I'd like to see the value of **fixed\_interval** in **date\_histogram** in the generated response. Is it possible to tell in the DSL query to display this or any parameter value in the result response?

```auto
GET workflow*/_search
{
    "query": {
        "bool": {
          "must": [],
          "filter": [
            {
              "match_phrase": {
                "job_name.keyword": "fakejobname"
              }
            },
            {
              "range": {
                "@timestamp": {
                  "format": "strict_date_optional_time",
                  "gte": "2023-05-08T22:00:00.000Z",
                  "lte": "2023-05-16T21:30:00.000Z"
                }
              }
            }
          ],
          "should": [],
          "must_not": []
        }
    },
    "track_total_hits": true,
    "size": 0,
    "aggs": {
        "consumer_runtime_avg": {
              "avg": {
                "field": "kafka-performance.consumer_run_time"
              }
        },
        "consumer_runtime_min": {
              "min": {
                "field": "kafka-performance.consumer_run_time"
              }
        },
        "consumer_runtime_max": {
              "max": {
                "field": "kafka-performance.consumer_run_time"
              }
        },
        "percentiles": {
          "percentiles": {
            "field": "kafka-performance.consumer_run_time" 
          }
        },
        "consumer_runtime_interval_buckets": {
            "date_histogram": {
              "field": "@timestamp",
              "fixed_interval": "1h"
            },
            "aggs": {
              "runtime_per_bucket": {
                "max": {
                  "field": "kafka-performance.consumer_run_time"
                }
              }
            }
        }
    }
}

```

---

<div class="post-metadata">

### Author: ![bgyomorei\_c](https://avatars.discourse-cdn.com/v4/letter/b/ad7895/32.png) [@bgyomorei\_c](https://discuss.elastic.co/u/bgyomorei_c)
#### Post date: [November 9, 2023, 5:00pm UTC](https://discuss.elastic.co/t/showing-query-parameters-in-dsl-query-results/345758/2 "2023-11-09T17:00:10Z")

</div>

Aggregation metadata to the rescue: [Aggregations | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html#add-metadata-to-an-agg)

---

<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: [December 7, 2023, 5:00pm UTC](https://discuss.elastic.co/t/showing-query-parameters-in-dsl-query-results/345758/3 "2023-12-07T17:00:12Z")

</div>

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