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

[source, js]
----
const response = await client.indices.downsample({
  index: ".ds-my-data-stream-2023.07.26-000001",
  target_index: ".ds-my-data-stream-2023.07.26-000001-downsample",
  config: {
    fixed_interval: "1h",
  },
});
console.log(response);
----
