// 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.index({
  index: "metricbeat-2016.05.30",
  id: 1,
  refresh: "true",
  document: {
    "system.cpu.idle.pct": 0.908,
  },
});
console.log(response);

const response1 = await client.index({
  index: "metricbeat-2016.05.31",
  id: 1,
  refresh: "true",
  document: {
    "system.cpu.idle.pct": 0.105,
  },
});
console.log(response1);
----
