// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.mjs` to generate the docs examples

[source, js]
----
const response = await client.search({
  index: "my-data-stream",
  size: 0,
  aggs: {
    tsid: {
      terms: {
        field: "_tsid",
      },
      aggs: {
        over_time: {
          date_histogram: {
            field: "@timestamp",
            fixed_interval: "1d",
          },
          aggs: {
            min: {
              min: {
                field: "kubernetes.container.memory.usage.bytes",
              },
            },
            max: {
              max: {
                field: "kubernetes.container.memory.usage.bytes",
              },
            },
            avg: {
              avg: {
                field: "kubernetes.container.memory.usage.bytes",
              },
            },
          },
        },
      },
    },
  },
});
console.log(response);
----
