[source, ruby]
----
response = client.reindex(
  body: {
    source: {
      remote: {
        host: 'http://otherhost:9200',
        headers: {
          "Authorization": 'ApiKey API_KEY_VALUE'
        }
      },
      index: 'my-index-000001',
      query: {
        match: {
          test: 'data'
        }
      }
    },
    dest: {
      index: 'my-new-index-000001'
    }
  }
)
puts response
----
